| 1 | <?php |
||
| 10 | class PartitionItem implements PartitionItemInterface |
||
| 11 | { |
||
| 12 | |||
| 13 | protected $item; |
||
| 14 | protected $valueOrCallable; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * PartitionItem constructor. |
||
| 18 | * |
||
| 19 | * @param mixed $item |
||
| 20 | * The item. |
||
| 21 | * @param float|callable $valueOrCallable |
||
|
|
|||
| 22 | * A callable that will get it's value or a value. |
||
| 23 | */ |
||
| 24 | 14 | public function __construct($item, $valueOrCallable = null) |
|
| 29 | |||
| 30 | /** |
||
| 31 | * {@inheritdoc} |
||
| 32 | */ |
||
| 33 | 11 | public function getValue() |
|
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritdoc} |
||
| 48 | */ |
||
| 49 | 14 | public function getItem() |
|
| 53 | } |
||
| 54 |
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.