@@ -135,7 +135,7 @@ |
||
135 | 135 | $stub = clone $this->knownSides[$knownType][$key]; |
136 | 136 | $isMulti = ($stub->getMultiplicity()->getValue() == AssociationStubRelationType::MANY); |
137 | 137 | $relPolyTypeName = substr($lc->getBaseType(), strrpos($lc->getBaseType(), '\\')+1); |
138 | - $relPolyTypeName = str_plural($relPolyTypeName, $isMulti?2:1); |
|
138 | + $relPolyTypeName = str_plural($relPolyTypeName, $isMulti ? 2 : 1); |
|
139 | 139 | $stub->setRelationName($stub->getRelationName() . '_' . $relPolyTypeName); |
140 | 140 | $assoc = new AssociationMonomorphic(); |
141 | 141 | $first = -1 === $stub->compare($lc); |
@@ -142,7 +142,7 @@ |
||
142 | 142 | $metaCount = count($meta->oDataEntityMap); |
143 | 143 | $entityCount = count($entities); |
144 | 144 | $expected = 2 * $entityCount; |
145 | - assert($metaCount == $expected, 'Expected ' . $expected . ' items, actually got '.$metaCount); |
|
145 | + assert($metaCount == $expected, 'Expected ' . $expected . ' items, actually got ' . $metaCount); |
|
146 | 146 | |
147 | 147 | if (0 === count($objectModel->getAssociations())) { |
148 | 148 | return; |
@@ -119,13 +119,13 @@ discard block |
||
119 | 119 | public function setFields(array $fields) |
120 | 120 | { |
121 | 121 | if (0 == count($fields)) { |
122 | - $msg = 'Fields array must not be empty for '.$this->getClassName(); |
|
122 | + $msg = 'Fields array must not be empty for ' . $this->getClassName(); |
|
123 | 123 | throw new \Exception($msg); |
124 | 124 | } |
125 | 125 | $keys = []; |
126 | 126 | foreach ($fields as $propName => $field) { |
127 | 127 | if (!$field instanceof EntityField) { |
128 | - $msg = 'Fields array must only have EntityField objects for '.$this->getClassName(); |
|
128 | + $msg = 'Fields array must only have EntityField objects for ' . $this->getClassName(); |
|
129 | 129 | throw new \Exception($msg); |
130 | 130 | } |
131 | 131 | if ($field->getIsKeyField()) { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | } |
134 | 134 | } |
135 | 135 | if (0 == count($keys)) { |
136 | - $msg = 'No key field supplied in fields array for '.$this->getClassName(); |
|
136 | + $msg = 'No key field supplied in fields array for ' . $this->getClassName(); |
|
137 | 137 | throw new \Exception($msg); |
138 | 138 | } |
139 | 139 | $this->fields = $fields; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | foreach ($orderBy->getOrderByInfo()->getOrderByPathSegments() as $order) { |
101 | 101 | foreach ($order->getSubPathSegments() as $subOrder) { |
102 | 102 | $subName = $subOrder->getName(); |
103 | - $subName = $tableName.'.'.$subName; |
|
103 | + $subName = $tableName . '.' . $subName; |
|
104 | 104 | $sourceEntityInstance = $sourceEntityInstance->orderBy( |
105 | 105 | $subName, |
106 | 106 | $order->isAscending() ? 'asc' : 'desc' |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | assert(is_string($line), 'Eager-load elements must be non-empty strings'); |
421 | 421 | $lineParts = explode('/', $line); |
422 | 422 | $numberOfParts = count($lineParts); |
423 | - for ($i = 0; $i<$numberOfParts; $i++) { |
|
423 | + for ($i = 0; $i < $numberOfParts; $i++) { |
|
424 | 424 | $lineParts[$i] = $this->getLaravelRelationName($lineParts[$i]); |
425 | 425 | } |
426 | 426 | $remixLine = implode('.', $lineParts); |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | // so we can't bail out early |
502 | 502 | $rawCount += $results->count(); |
503 | 503 | // now bolt on filtrate to accumulating result set if we haven't accumulated enough bitz |
504 | - if ($rawTop > $resultSet->count() + $skip) { |
|
504 | + if ($rawTop > $resultSet->count()+$skip) { |
|
505 | 505 | $resultSet = collect(array_merge($resultSet->all(), $results->all())); |
506 | 506 | $sliceAmount = min($skip, $resultSet->count()); |
507 | 507 | $resultSet = $resultSet->slice($sliceAmount); |