Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | protected function checkRelationPropertiesCached($targClass, ResourceEntityType $resourceType) |
||
24 | { |
||
25 | if (!array_key_exists($targClass, $this->propertiesCache)) { |
||
26 | $rawProp = $resourceType->getAllProperties(); |
||
27 | $relProp = []; |
||
28 | $nonRelProp = []; |
||
29 | foreach ($rawProp as $prop) { |
||
30 | $propType = $prop->getResourceType(); |
||
31 | if ($propType instanceof ResourceEntityType) { |
||
32 | $relProp[] = $prop; |
||
33 | } else { |
||
34 | $nonRelProp[$prop->getName()] = ['prop' => $prop, 'type' => $propType->getInstanceType()]; |
||
35 | } |
||
36 | } |
||
37 | $this->propertiesCache[$targClass] = ['rel' => $relProp, 'nonRel' => $nonRelProp]; |
||
38 | } |
||
41 |