@@ -27,21 +27,21 @@ class TypeProcessor
2727 /**#@+
2828 * Pre-normalized type constants
2929 */
30- const STRING_TYPE = 'str ' ;
31- const INT_TYPE = 'integer ' ;
32- const BOOLEAN_TYPE = 'bool ' ;
33- const ANY_TYPE = 'mixed ' ;
30+ public const STRING_TYPE = 'str ' ;
31+ public const INT_TYPE = 'integer ' ;
32+ public const BOOLEAN_TYPE = 'bool ' ;
33+ public const ANY_TYPE = 'mixed ' ;
3434 /**#@-*/
3535
3636 /**#@+
3737 * Normalized type constants
3838 */
39- const NORMALIZED_STRING_TYPE = 'string ' ;
40- const NORMALIZED_INT_TYPE = 'int ' ;
41- const NORMALIZED_FLOAT_TYPE = 'float ' ;
42- const NORMALIZED_DOUBLE_TYPE = 'double ' ;
43- const NORMALIZED_BOOLEAN_TYPE = 'boolean ' ;
44- const NORMALIZED_ANY_TYPE = 'anyType ' ;
39+ public const NORMALIZED_STRING_TYPE = 'string ' ;
40+ public const NORMALIZED_INT_TYPE = 'int ' ;
41+ public const NORMALIZED_FLOAT_TYPE = 'float ' ;
42+ public const NORMALIZED_DOUBLE_TYPE = 'double ' ;
43+ public const NORMALIZED_BOOLEAN_TYPE = 'boolean ' ;
44+ public const NORMALIZED_ANY_TYPE = 'anyType ' ;
4545 /**#@-*/
4646
4747 /**
@@ -857,6 +857,7 @@ private function getMethodReturnAnnotation(MethodReflection $methodReflection)
857857 $ methodName = $ methodReflection ->getName ();
858858 $ returnAnnotations = $ this ->getReturnFromDocBlock ($ methodReflection );
859859
860+ // @phpstan-ignore-next-line as $returnAnnotations can be empty
860861 if (empty ($ returnAnnotations )) {
861862 $ classReflection = $ methodReflection ->getDeclaringClass ();
862863 // method can inherit doc block from implemented interface, like for interceptors
@@ -871,6 +872,7 @@ private function getMethodReturnAnnotation(MethodReflection $methodReflection)
871872 }
872873 }
873874
875+ // @phpstan-ignore-next-line as $returnAnnotations can be empty
874876 if (empty ($ returnAnnotations )) {
875877 while ($ classReflection ->getParentClass ()) {
876878 $ classReflection = $ classReflection ->getParentClass ();
@@ -883,6 +885,7 @@ private function getMethodReturnAnnotation(MethodReflection $methodReflection)
883885 }
884886
885887 // throw an exception if even implemented interface doesn't have return annotations
888+ // @phpstan-ignore-next-line as $returnAnnotations can be empty
886889 if (empty ($ returnAnnotations )) {
887890 throw new \InvalidArgumentException (
888891 "Method's return type must be specified using @return annotation. "
0 commit comments