Use empty for the OCP @since checker
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
99e14b5ada
commit
cdcd61d4c8
|
@ -55,7 +55,7 @@ class SinceTagCheckVisitor extends \PhpParser\NodeVisitorAbstract {
|
||||||
/** @var \PhpParser\Comment\Doc[] $comments */
|
/** @var \PhpParser\Comment\Doc[] $comments */
|
||||||
$comments = $node->getAttribute('comments');
|
$comments = $node->getAttribute('comments');
|
||||||
|
|
||||||
if (count($comments) === 0) {
|
if (empty($comments)) {
|
||||||
$this->errors[] = 'PHPDoc is needed for ' . $this->namespace . '\\' . $this->className . '::' . $node->name;
|
$this->errors[] = 'PHPDoc is needed for ' . $this->namespace . '\\' . $this->className . '::' . $node->name;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ class SinceTagCheckVisitor extends \PhpParser\NodeVisitorAbstract {
|
||||||
/** @var \PhpParser\Comment\Doc[] $comments */
|
/** @var \PhpParser\Comment\Doc[] $comments */
|
||||||
$comments = $node->getAttribute('comments');
|
$comments = $node->getAttribute('comments');
|
||||||
|
|
||||||
if (count($comments) === 0) {
|
if (empty($comments)) {
|
||||||
$this->errors[] = 'PHPDoc is needed for ' . $this->namespace . '\\' . $this->className . '::' . $node->name;
|
$this->errors[] = 'PHPDoc is needed for ' . $this->namespace . '\\' . $this->className . '::' . $node->name;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue