From a29cd5c528ececde017f66054656703f6338b4c3 Mon Sep 17 00:00:00 2001 From: Chuck Burgess Date: Wed, 20 Jun 2018 09:15:29 -0500 Subject: [PATCH] initialize line count to an int; --- src/DocBlock/Tags/Example.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/DocBlock/Tags/Example.php b/src/DocBlock/Tags/Example.php index baa437c..d43fe83 100644 --- a/src/DocBlock/Tags/Example.php +++ b/src/DocBlock/Tags/Example.php @@ -42,10 +42,11 @@ final class Example extends BaseTag */ 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::greaterThanEq($startingLine, 0); + Assert::greaterThanEq($lineCount, 0); $this->filePath = $filePath; $this->startingLine = $startingLine; @@ -96,7 +97,7 @@ final class Example extends BaseTag } $startingLine = 1; - $lineCount = null; + $lineCount = 0; $description = null; if (array_key_exists(3, $matches)) {