| Conditions | 6 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | 4 | private function clear() |
|
| 52 | { |
||
| 53 | 4 | if (empty($this->whiteList) && empty($this->blackList)) { |
|
| 54 | 2 | $this->em->clear(); |
|
| 55 | 2 | } elseif (!empty($this->whiteList)) { |
|
| 56 | 1 | foreach ($this->whiteList as $class) { |
|
| 57 | 1 | $this->em->clear($class); |
|
| 58 | } |
||
| 59 | 1 | } elseif (!empty($this->blackList)) { |
|
| 60 | 1 | throw new \Exception('unsupported blacklist'); |
|
| 61 | } |
||
| 62 | |||
| 63 | 3 | gc_collect_cycles(); |
|
| 64 | 3 | } |
|
| 66 |