Browse Source

Fix property check in phpdoc command

tags/2.0.39.1
Alexander Makarov 4 years ago
parent
commit
eb65069312
No known key found for this signature in database
GPG Key ID: 3617B79C6A325E4A
  1. 6
      build/controllers/PhpDocController.php

6
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;
}

Loading…
Cancel
Save