Skip to content
Snippets Groups Projects
Unverified Commit cdcd61d4 authored by Christoph Wurst's avatar Christoph Wurst
Browse files

Use empty for the OCP @since checker

parent 99e14b5a
No related branches found
No related tags found
No related merge requests found
...@@ -55,7 +55,7 @@ class SinceTagCheckVisitor extends \PhpParser\NodeVisitorAbstract { ...@@ -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 { ...@@ -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;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment