summaryrefslogtreecommitdiffstats
path: root/phpdoc-php-warning-count-fix.patch
blob: a30786373f6970318269f7343d5100e647c970f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/phpDocumentor/Plugin/Core/Descriptor/Validator/Constraints/Functions/IsArgumentInDocBlockValidator.php b/src/phpDocumentor/Plugin/Core/Descriptor/Validator/Constraints/Functions/IsArgumentInDocBlockValidator.php
index 1e31c932..4baf2fb4 100644
--- a/src/phpDocumentor/Plugin/Core/Descriptor/Validator/Constraints/Functions/IsArgumentInDocBlockValidator.php
+++ b/src/phpDocumentor/Plugin/Core/Descriptor/Validator/Constraints/Functions/IsArgumentInDocBlockValidator.php
@@ -30,7 +30,7 @@ class IsArgumentInDocBlockValidator extends ConstraintValidator
      */
     public function validate($value, Constraint $constraint)
     {
-        if ($value instanceof ValidationValueObject && count($value->argument) > 0) {
+        if ($value instanceof ValidationValueObject && $value->argument instanceof Countable && count($value->argument) > 0) {
             $argument = $value->argument;
             /* @var $params \phpDocumentor\Descriptor\Collection */
             $params   = $value->parameters;