Total Complexity | 7 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
7 | class ChainCollection |
||
8 | { |
||
9 | public $data = []; |
||
10 | |||
11 | 14 | public function forgetAbout($manager, $models, $event = null) |
|
12 | { |
||
13 | 14 | $models = is_array($models[0]) ? $models[0] : $models; |
|
14 | |||
15 | 14 | foreach ($models as $model) { |
|
16 | 14 | if ($event) { |
|
17 | 4 | unset($this->data[$manager][$model][$event]); |
|
18 | } else { |
||
19 | 14 | unset($this->data[$manager][$model]); |
|
20 | } |
||
21 | } |
||
22 | 14 | } |
|
23 | |||
24 | 106 | public function commitChain() |
|
34 | } |
||
35 | 106 | } |
|
36 | |||
37 | /** |
||
38 | * initialize the chain. |
||
39 | * |
||
40 | * @param $manager |
||
41 | * @param array $values |
||
42 | * @param string $param |
||
43 | */ |
||
44 | 116 | public function init($manager, array $values, string $param = 'default') |
|
52 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.