From: Christoph Wurst Date: Tue, 9 Jun 2020 06:49:24 +0000 (+0200) Subject: Use empty for the OCP @since checker X-Git-Tag: v20.0.0beta1~439^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cdcd61d4c80224570bff413c948019d109b099b0;p=nextcloud-server.git Use empty for the OCP @since checker Signed-off-by: Christoph Wurst --- diff --git a/build/OCPSinceChecker.php b/build/OCPSinceChecker.php index ff314170149..75ce9c97cbc 100644 --- a/build/OCPSinceChecker.php +++ b/build/OCPSinceChecker.php @@ -55,7 +55,7 @@ class SinceTagCheckVisitor extends \PhpParser\NodeVisitorAbstract { /** @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; } @@ -78,7 +78,7 @@ class SinceTagCheckVisitor extends \PhpParser\NodeVisitorAbstract { /** @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; }