@@ -131,10 +131,10 @@ |
||
131 | 131 | if (0 == count($lastCandidates)) { |
132 | 132 | continue; |
133 | 133 | } |
134 | - foreach($lastCandidates as $lc){ |
|
134 | + foreach ($lastCandidates as $lc) { |
|
135 | 135 | $stub = clone $this->knownSides[$knownType][$key]; |
136 | 136 | $isMulti = ($stub->getMultiplicity()->getValue() == \AlgoWeb\PODataLaravel\Models\ObjectMap\Entities\Associations\AssociationStubRelationType::MANY); |
137 | - $RelPolyTypeName = str_plural(substr($lc->getBaseType(),strrpos($lc->getBaseType(),"\\")+1),$isMulti?2:1); |
|
137 | + $RelPolyTypeName = str_plural(substr($lc->getBaseType(), strrpos($lc->getBaseType(), "\\")+1), $isMulti ? 2 : 1); |
|
138 | 138 | $stub->setRelationName($stub->getRelationName() . "_" . $RelPolyTypeName); |
139 | 139 | $assoc = new AssociationMonomorphic(); |
140 | 140 | $first = -1 === $stub->compare($lc); |
@@ -131,7 +131,7 @@ |
||
131 | 131 | if (0 == count($lastCandidates)) { |
132 | 132 | continue; |
133 | 133 | } |
134 | - foreach($lastCandidates as $lc){ |
|
134 | + foreach($lastCandidates as $lc) { |
|
135 | 135 | $stub = clone $this->knownSides[$knownType][$key]; |
136 | 136 | $isMulti = ($stub->getMultiplicity()->getValue() == \AlgoWeb\PODataLaravel\Models\ObjectMap\Entities\Associations\AssociationStubRelationType::MANY); |
137 | 137 | $RelPolyTypeName = str_plural(substr($lc->getBaseType(),strrpos($lc->getBaseType(),"\\")+1),$isMulti?2:1); |
@@ -194,7 +194,7 @@ |
||
194 | 194 | { |
195 | 195 | if ($association instanceof AssociationMonomorphic) { |
196 | 196 | $stub = $isFirst ? $association->getFirst() : $association->getLast(); |
197 | - if (null === $stub || (!in_array($stub, $this->stubs) && !($stub instanceof AssociationStubPolymorphic) )) { |
|
197 | + if (null === $stub || (!in_array($stub, $this->stubs) && !($stub instanceof AssociationStubPolymorphic))) { |
|
198 | 198 | throw new \InvalidArgumentException('Association cannot be connected to this entity'); |
199 | 199 | } |
200 | 200 | $propertyName = $stub->getRelationName(); |
@@ -137,7 +137,7 @@ |
||
137 | 137 | $metaCount = count($meta->oDataEntityMap); |
138 | 138 | $entityCount = count($entities); |
139 | 139 | $expected = 2 * $entityCount; |
140 | - assert($metaCount == $expected, 'Expected ' . $expected . ' items, actually got '.$metaCount); |
|
140 | + assert($metaCount == $expected, 'Expected ' . $expected . ' items, actually got ' . $metaCount); |
|
141 | 141 | |
142 | 142 | if (null === $objectModel->getAssociations()) { |
143 | 143 | return; |