| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 12 |
| Ratio | 100 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace League\Fractal\Test\Stub\Transformer; |
||
| 34 | View Code Duplication | public function includeCoAuthor(array $book) |
|
| 35 | { |
||
| 36 | if (!array_key_exists('_co_author', $book)) { |
||
| 37 | return; |
||
| 38 | } |
||
| 39 | |||
| 40 | if ($book['_co_author'] === null) { |
||
| 41 | return $this->null(); |
||
| 42 | } |
||
| 43 | |||
| 44 | return $this->item($book['_co_author'], new JsonApiAuthorTransformer(), 'people'); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |