| 1 | <?php |
||
| 8 | trait Collection |
||
| 9 | { |
||
| 10 | /** @var Matchable[] */ |
||
| 11 | protected $items; |
||
| 12 | |||
| 13 | /** @var Matchable[] */ |
||
| 14 | public function __construct(array $items) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param array $criteria |
||
| 24 | * |
||
| 25 | * @return static |
||
| 26 | */ |
||
| 27 | public function findMatching(array $criteria) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | public function offsetExists($offset) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return Matchable |
||
| 47 | */ |
||
| 48 | public function offsetGet($offset) |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @throws MutabilityException |
||
| 55 | */ |
||
| 56 | public function offsetSet($offset, $value) |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @throws MutabilityException |
||
| 63 | */ |
||
| 64 | public function offsetUnset($offset) |
||
| 68 | |||
| 69 | public function count() |
||
| 73 | |||
| 74 | public function matches($criteria) |
||
| 78 | |||
| 79 | abstract protected function assertItemTypesAreCorrect(array $items); |
||
| 80 | } |
||
| 81 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.