Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
47 | public function getIdentity($entity) |
||
48 | { |
||
49 | $identity = $this->propertyAccessor->getValue($entity, $this->identity->getPropertyName()); |
||
50 | |||
51 | if (empty($identity) && $identity !== 0) { |
||
52 | throw new RuntimeException("Can't get identity from not identified entity."); |
||
53 | } |
||
54 | |||
55 | return $identity; |
||
56 | } |
||
57 | } |
||
58 |