| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | 4 | protected function getIdentifierValues($value) |
|
| 38 | { |
||
| 39 | 4 | if (!is_object($value)) { |
|
| 40 | 3 | throw new \InvalidArgumentException('Only Doctrine objects can be serialized'); |
|
| 41 | } |
||
| 42 | |||
| 43 | 1 | $class = get_class($value); |
|
| 44 | 1 | $metadata = $this->doctrine->getManager()->getClassMetadata($class); |
|
| 45 | |||
| 46 | 1 | return $metadata->getIdentifierValues($value); |
|
| 47 | } |
||
| 48 | } |
||
| 49 |