Skip to content

Commit a29cd5c

Browse files
committed
initialize line count to an int;
1 parent 329341a commit a29cd5c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/DocBlock/Tags/Example.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ final class Example extends BaseTag
4242
*/
4343
private $lineCount;
4444

45-
public function __construct(string $filePath, bool $isURI, int $startingLine, $lineCount, $description)
45+
public function __construct(string $filePath, bool $isURI, int $startingLine, int $lineCount, $description)
4646
{
4747
Assert::notEmpty($filePath);
4848
Assert::greaterThanEq($startingLine, 0);
49+
Assert::greaterThanEq($lineCount, 0);
4950

5051
$this->filePath = $filePath;
5152
$this->startingLine = $startingLine;
@@ -96,7 +97,7 @@ public static function create(string $body): ?Tag
9697
}
9798

9899
$startingLine = 1;
99-
$lineCount = null;
100+
$lineCount = 0;
100101
$description = null;
101102

102103
if (array_key_exists(3, $matches)) {

0 commit comments

Comments
 (0)