Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
26 | 3 | public function handle($object) |
|
27 | { |
||
28 | 3 | if (!is_array($object)) { |
|
29 | 1 | throw new \InvalidArgumentException(sprintf('Expected array for splitting, got %s', gettype($object))); |
|
30 | } |
||
31 | |||
32 | 2 | $storage = $this->stack->getScope('local'); |
|
33 | |||
34 | 2 | foreach ($object as $element) { |
|
35 | 2 | $storage->add($element); |
|
36 | 2 | } |
|
37 | 2 | } |
|
38 | } |
||
39 |