| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 9 | 
| Code Lines | 6 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 0 | 
| CRAP Score | 6 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 36 | protected function loadCollection($data = null, AbstractTransformer $transformer = null) | ||
| 37 |     { | ||
| 38 | $result = $this->getCurrentScope() | ||
| 39 | ->getManager() | ||
| 40 | ->setSerializer(new ArraySerializer) | ||
| 41 | ->createData($this->collection($data, $transformer))->toArray(); | ||
| 42 | |||
| 43 | return (isset($result['data'])) ? $result['data'] : $result; | ||
| 44 | } | ||
| 45 | } | ||
| 46 | 
It seems like you allow that null is being passed for a parameter, however the function which is called does not seem to accept null.
We recommend to add an additional type check (or disallow null for the parameter):