| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | protected function whatEvenIsThis(array $array1, array $array2): array |
||
| 34 | { |
||
| 35 | /* |
||
| 36 | if both primary and secondary are empty this will return false |
||
| 37 | because the "array_diff" family of functions returns an empty array |
||
| 38 | if the first array provided is empty itself. if both arrays are |
||
| 39 | empty this will return an empty array as there is no difference. |
||
| 40 | */ |
||
| 41 | return !empty($array1) |
||
| 42 | ? $this->diff($array1, $array2) |
||
| 43 | : $this->diff($array2, $array1); |
||
| 44 | } |
||
| 46 |