| 1 | <?php |
||
| 10 | class PartitionItem implements PartitionItemInterface { |
||
| 11 | |||
| 12 | protected $item; |
||
| 13 | protected $valueCallable; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * PartitionItem constructor. |
||
| 17 | * |
||
| 18 | * @param mixed $item |
||
| 19 | * The item. |
||
| 20 | * @param callable $valueCallable |
||
|
|
|||
| 21 | * The callable that will get it's value. |
||
| 22 | */ |
||
| 23 | 10 | public function __construct($item, callable $valueCallable = NULL) { |
|
| 27 | |||
| 28 | /** |
||
| 29 | * {@inheritdoc} |
||
| 30 | */ |
||
| 31 | 8 | public function getValue() { |
|
| 38 | |||
| 39 | /** |
||
| 40 | * {@inheritdoc} |
||
| 41 | */ |
||
| 42 | 10 | public function getItem() { |
|
| 45 | |||
| 46 | } |
||
| 47 |
This check looks for
@paramannotations 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
arrayand 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.