Skip to content

Commit 2d3d238

Browse files
committed
Adds name to example tag
1 parent 1d3a5e8 commit 2d3d238

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/DocBlock/Tags/Example.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public function __construct($filePath, $isURI, $startingLine, $lineCount, $descr
5151
$this->filePath = $filePath;
5252
$this->startingLine = $startingLine;
5353
$this->lineCount = $lineCount;
54+
$this->name = 'example';
5455
if ($description !== null) {
5556
$this->description = trim($description);
5657
}

tests/unit/DocBlock/Tags/ExampleTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public function testExampleWithoutContent()
2020
$tag = Example::create('"example1.php"');
2121
$this->assertEquals('"example1.php"', $tag->getContent());
2222
$this->assertEquals('', $tag->getDescription());
23+
$this->assertEquals('example', $tag->getName());
2324
}
2425

2526
/**

0 commit comments

Comments
 (0)