Should the type for parameter $callback 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...
15
* @return \Redis|array
16
*/
17
public function transaction(callable $callback = 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.