initialize line count to an int;

This commit is contained in:
Chuck Burgess
2018-06-20 09:34:23 -05:00
parent 329341ac93
commit a29cd5c528
+3 -2
View File
@@ -42,10 +42,11 @@ final class Example extends BaseTag
*/ */
private $lineCount; private $lineCount;
public function __construct(string $filePath, bool $isURI, int $startingLine, $lineCount, $description) public function __construct(string $filePath, bool $isURI, int $startingLine, int $lineCount, $description)
{ {
Assert::notEmpty($filePath); Assert::notEmpty($filePath);
Assert::greaterThanEq($startingLine, 0); Assert::greaterThanEq($startingLine, 0);
Assert::greaterThanEq($lineCount, 0);
$this->filePath = $filePath; $this->filePath = $filePath;
$this->startingLine = $startingLine; $this->startingLine = $startingLine;
@@ -96,7 +97,7 @@ final class Example extends BaseTag
} }
$startingLine = 1; $startingLine = 1;
$lineCount = null; $lineCount = 0;
$description = null; $description = null;
if (array_key_exists(3, $matches)) { if (array_key_exists(3, $matches)) {