| Conditions | 6 |
| Paths | 4 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 58 | 2 | private function clear() |
|
| 59 | 2 | { |
|
| 60 | 1 | if (empty($this->whiteList) && empty($this->blackList)) { |
|
| 61 | 1 | $this->em->clear(); |
|
| 62 | } elseif (!empty($this->whiteList)) { |
||
| 63 | 1 | foreach ($this->whiteList as $class) { |
|
| 64 | 1 | $this->em->clear($class); |
|
| 65 | } |
||
| 66 | } elseif (!empty($this->blackList)) { |
||
| 67 | 3 | throw new \Exception('unsupported blacklist'); |
|
| 68 | 3 | } |
|
| 69 | |||
| 70 | gc_collect_cycles(); |
||
| 71 | } |
||
| 73 |