| Conditions | 8 |
| Paths | 6 |
| Total Lines | 20 |
| Code Lines | 13 |
| Lines | 7 |
| Ratio | 35 % |
| Tests | 0 |
| CRAP Score | 72 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 87 | protected function toArrayRecursive($data) |
||
| 88 | { |
||
| 89 | if (is_array($data) || is_object($data)) { |
||
| 90 | $result = []; |
||
| 91 | foreach ($data as $key => $value) { |
||
| 92 | if ($key === "mappingClasses") { |
||
| 93 | continue; |
||
| 94 | } |
||
| 95 | View Code Duplication | if (is_object($value) && method_exists($value, "getAll")) { |
|
| 96 | $result[$key] = $this->toArrayRecursive($value->getAll()); |
||
| 97 | } else { |
||
| 98 | if ($value !== null) { |
||
| 99 | $result[$key] = $this->toArrayRecursive($value); |
||
| 100 | } |
||
| 101 | } |
||
| 102 | } |
||
| 103 | return $result; |
||
| 104 | } |
||
| 105 | return $data; |
||
| 106 | } |
||
| 107 | } |
||
| 108 |
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.