| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.0416 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 1 | public function getEntityKey(ApiMetadata $metadata, array $identifier) |
|
| 17 | { |
||
| 18 | 1 | foreach ($metadata->getIdentifierFieldNames() as $name) { |
|
| 19 | 1 | if ($metadata->hasAssociation($name)) { |
|
| 20 | throw new \LogicException('Invalid strategy for relation-based identifier'); |
||
| 21 | } |
||
| 22 | 1 | } |
|
| 23 | |||
| 24 | 1 | return $this->getEntityPrefix($metadata) . '_' . json_encode($identifier); |
|
| 25 | } |
||
| 26 | } |
||
| 27 |