| Conditions | 6 |
| Paths | 5 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 6.0702 |
| Changes | 0 | ||
| 1 | <?php |
||
| 49 | 4 | public function forgetAbout($models, $event = null) |
|
| 50 | { |
||
| 51 | 4 | foreach ($models as $model) { |
|
| 52 | 4 | foreach ($this->data as $i => $data) { |
|
| 53 | 4 | if (($key = array_search($model, $data[0])) === false) { |
|
| 54 | 2 | continue; |
|
| 55 | } |
||
| 56 | |||
| 57 | 4 | if (!is_null($event) && $event !== $data[1]) { |
|
| 58 | continue; |
||
| 59 | } |
||
| 60 | |||
| 61 | 4 | unset($this->data[$i][0][$key]); |
|
| 62 | } |
||
| 66 |