]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use empty for the OCP @since checker 21332/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Tue, 9 Jun 2020 06:49:24 +0000 (08:49 +0200)
committerChristoph Wurst <christoph@winzerhof-wurst.at>
Tue, 9 Jun 2020 06:49:24 +0000 (08:49 +0200)
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
build/OCPSinceChecker.php

index ff314170149ef118f0c3c014e61aaebd95669ba6..75ce9c97cbcf66fd215e7aa7c72b82ff4ab9ed2d 100644 (file)
@@ -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;
                        }