Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 4 | Features | 0 |
1 | <?php |
||
18 | public function extract($object) |
||
19 | { |
||
20 | if (!$object instanceof UserEntityInterface) { |
||
21 | throw new Exception\InvalidArgumentException('$object must be an instance of ZfcUser\Entity\UserInterface'); |
||
22 | } |
||
23 | /* @var $object UserInterface */ |
||
24 | $data = parent::extract($object); |
||
25 | if ($data['id'] !== null) { |
||
26 | $data = $this->mapField('id', 'user_id', $data); |
||
27 | } else { |
||
28 | unset($data['id']); |
||
29 | } |
||
30 | return $data; |
||
31 | } |
||
32 | |||
57 |