Should the type for parameter $valueCallable not be null|callable? Also, consider making the array more specific, something like array<String>, or String[].
This check looks for @param annotations where the type inferred by our
type inference engine differs from the declared type.
It makes a suggestion as to what type it considers more descriptive. In addition it
looks for parameters that have the generic type array and suggests a stricter type
like array<String>.
Most often this is a case of a parameter that can be null in addition to
its declared types.
Loading history...
21
* The callable that will get it's value.
22
*/
23
10
public function __construct($item, callable $valueCallable = NULL) {
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive. In addition it looks for parameters that have the generic type
array
and suggests a stricter type likearray<String>
.Most often this is a case of a parameter that can be null in addition to its declared types.