Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
/** @var \PhpParser\Comment\Doc[] $comments */
$comments = $node->getAttribute('comments');
- if (count($comments) === 0) {
+ if (empty($comments)) {
$this->errors[] = 'PHPDoc is needed for ' . $this->namespace . '\\' . $this->className . '::' . $node->name;
return;
}
/** @var \PhpParser\Comment\Doc[] $comments */
$comments = $node->getAttribute('comments');
- if (count($comments) === 0) {
+ if (empty($comments)) {
$this->errors[] = 'PHPDoc is needed for ' . $this->namespace . '\\' . $this->className . '::' . $node->name;
return;
}