| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 1 | public function getOpList($entityPath) : array |
|
| 20 | { |
||
| 21 | 1 | $opList = []; |
|
| 22 | |||
| 23 | 1 | foreach ($this->metadata->justEntitiesMetadata() as $entityClass) { |
|
| 24 | 1 | $fields = $this->metadata->extractFields($entityClass); |
|
| 25 | |||
| 26 | 1 | $entity = StringParser::dotNotationFor($entityClass); |
|
| 27 | 1 | $opList[$entity]['fields'] = $fields; |
|
| 28 | |||
| 29 | 1 | if ($this->metadata->haveRelations()) { |
|
| 30 | 1 | $targetEntity = $this->metadata->getCurrentTargetEntity(); |
|
| 31 | 1 | $opList[$entity]['relations'] = [StringParser::dotNotationFor($targetEntity)]; |
|
| 32 | } |
||
| 33 | } |
||
| 34 | |||
| 35 | 1 | return $opList[$entityPath]; |
|
| 36 | } |
||
| 38 |