From eb65069312574125fbb3d70513edace8dd6d6172 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Tue, 10 Nov 2020 23:15:08 +0300 Subject: [PATCH] Fix property check in phpdoc command --- build/controllers/PhpDocController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/controllers/PhpDocController.php b/build/controllers/PhpDocController.php index 21f7ff8..1c7c660 100644 --- a/build/controllers/PhpDocController.php +++ b/build/controllers/PhpDocController.php @@ -620,9 +620,9 @@ class PhpDocController extends Controller $propertyPosition = false; foreach ($lines as $i => $line) { $line = trim($line); - if (strncmp($line, '* @property ', 12) === 0) { + if (strncmp($line, '* @property', 11) === 0) { $propertyPart = true; - } elseif ($propertyPart && $line == '*') { + } elseif ($propertyPart && $line === '*') { $propertyPosition = $i; $propertyPart = false; } @@ -635,7 +635,7 @@ class PhpDocController extends Controller } } - // if no properties or other tags where present add properties at the end + // if no properties or other tags were present add properties at the end if ($propertyPosition === false) { $propertyPosition = \count($lines) - 2; }