Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
26 | 4 | public function performFreeze() |
|
27 | { |
||
28 | 4 | $items = $this->getItems(); |
|
29 | |||
30 | 4 | self::ensureItemsAreTraversable($items); |
|
31 | |||
32 | 3 | foreach ($items as $item) { |
|
33 | 3 | if (! $item instanceof FreezableInterface) { |
|
34 | 1 | throw new \UnexpectedValueException( |
|
35 | 1 | 'Item must be instance of Clippings\Freezable\FreezableInterface to be freezed' |
|
36 | ); |
||
37 | } |
||
38 | |||
39 | 2 | $item->freeze(); |
|
40 | } |
||
41 | 2 | } |
|
42 | |||
68 |