| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function entity(array $data = []) |
||
| 18 | { |
||
| 19 | $userFactory = new UserFactory(); |
||
| 20 | $file = new File(); |
||
| 21 | $file->account = $userFactory->entity($data['account']); |
||
| 22 | unset($data['account']); |
||
| 23 | |||
| 24 | foreach ($data as $key => $value) { |
||
| 25 | $property = Inflector::variable($key); |
||
| 26 | $file->$property = $value; |
||
| 27 | } |
||
| 28 | |||
| 29 | return $file; |
||
| 30 | } |
||
| 32 |