| 1 | <?php |
||
| 8 | trait ObjectStorageTrait |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Force that this trait is used inside an OuterIterator |
||
| 12 | */ |
||
| 13 | use \Shrikeh\Collection\RequiresOuterIteratorTrait; |
||
| 14 | |||
| 15 | public function __construct(Traversable $objects) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @return mixed |
||
| 28 | */ |
||
| 29 | abstract protected function getStorage(); |
||
| 30 | |||
| 31 | /** |
||
| 32 | * We don't want to make this abstract, because then we would defeat the |
||
| 33 | * whole point of type hinting on this. |
||
| 34 | * Usage within domain collections should be append(SomeDomainThing $thing, $key) |
||
| 35 | * so instead we throw an Exception so a dev knows where the problem lies. |
||
| 36 | */ |
||
| 37 | private function append($data, $key) |
||
| 41 | } |
||
| 42 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.