@@ -54,7 +54,7 @@ |
||
54 | 54 | }; |
55 | 55 | $this->functionDescriptionParsers[ODataConstants::STRFUN_ENDSWITH] = function ($params) { |
56 | 56 | return '(strcmp(substr(' . $params[0] . ', strlen(' . $params[0] . ') - strlen(' . $params[1] . ')), ' |
57 | - .$params[1] . ') === 0)'; |
|
57 | + .$params[1] . ') === 0)'; |
|
58 | 58 | }; |
59 | 59 | $this->functionDescriptionParsers[ODataConstants::STRFUN_INDEXOF] = function ($params) { |
60 | 60 | return 'strpos(' . $params[0] . ', ' . $params[1] . ')'; |
@@ -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; |
@@ -70,7 +70,7 @@ |
||
70 | 70 | $others = $this->getRelationsByRelationName($className, $relName); |
71 | 71 | if ($stub instanceof AssociationStubMonomorphic) { |
72 | 72 | $msg = 'Monomorphic relation stub on ' . $className . ' ' . $relName |
73 | - . ' should point to at most 1 other stub'; |
|
73 | + . ' should point to at most 1 other stub'; |
|
74 | 74 | if (!(1 >= count($others))) { |
75 | 75 | throw new InvalidOperationException($msg); |
76 | 76 | } |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | public function retrieveCasts() |
636 | 636 | { |
637 | 637 | $exists = method_exists($this, 'getCasts'); |
638 | - return $exists ? (array)$this->getCasts() : (array)$this->casts; |
|
638 | + return $exists ? (array) $this->getCasts() : (array) $this->casts; |
|
639 | 639 | } |
640 | 640 | |
641 | 641 | /** |
@@ -782,7 +782,7 @@ discard block |
||
782 | 782 | $builder = $connect->getSchemaBuilder(); |
783 | 783 | $columns = $builder->getColumnListing($table); |
784 | 784 | |
785 | - self::$tableColumns = (array)$columns; |
|
785 | + self::$tableColumns = (array) $columns; |
|
786 | 786 | } |
787 | 787 | return self::$tableColumns; |
788 | 788 | } |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | { |
136 | 136 | /** @var SimpleMetadataProvider $meta */ |
137 | 137 | $meta = App::make('metadata'); |
138 | - $namespace = $meta->getContainerNamespace().'.'; |
|
138 | + $namespace = $meta->getContainerNamespace() . '.'; |
|
139 | 139 | |
140 | 140 | $entities = $objectModel->getEntities(); |
141 | 141 | foreach ($entities as $entity) { |
@@ -150,13 +150,13 @@ discard block |
||
150 | 150 | $entity->setOdataResourceType($entityType); |
151 | 151 | $this->implementProperties($entity); |
152 | 152 | $meta->addResourceSet($pluralName, $entityType); |
153 | - $meta->oDataEntityMap[$className] = $meta->oDataEntityMap[$namespace.$entityName]; |
|
153 | + $meta->oDataEntityMap[$className] = $meta->oDataEntityMap[$namespace . $entityName]; |
|
154 | 154 | } |
155 | 155 | $metaCount = count($meta->oDataEntityMap); |
156 | 156 | $entityCount = count($entities); |
157 | 157 | $expected = 2 * $entityCount; |
158 | 158 | if ($metaCount != $expected) { |
159 | - $msg = 'Expected ' . $expected . ' items, actually got '.$metaCount; |
|
159 | + $msg = 'Expected ' . $expected . ' items, actually got ' . $metaCount; |
|
160 | 160 | throw new InvalidOperationException($msg); |
161 | 161 | } |
162 | 162 |
@@ -189,14 +189,14 @@ discard block |
||
189 | 189 | |
190 | 190 | $keyRaw = $foo->$fkMethodName(); |
191 | 191 | $keySegments = explode('.', $keyRaw); |
192 | - $keyName = $keySegments[count($keySegments) - 1]; |
|
192 | + $keyName = $keySegments[count($keySegments)-1]; |
|
193 | 193 | $localRaw = $foo->$rkMethodName(); |
194 | 194 | $localSegments = explode('.', $localRaw); |
195 | - $localName = $localSegments[count($localSegments) - 1]; |
|
195 | + $localName = $localSegments[count($localSegments)-1]; |
|
196 | 196 | if (null !== $thruName) { |
197 | 197 | $thruRaw = $foo->$thruName(); |
198 | 198 | $thruSegments = explode('.', $thruRaw); |
199 | - $thruName = $thruSegments[count($thruSegments) - 1]; |
|
199 | + $thruName = $thruSegments[count($thruSegments)-1]; |
|
200 | 200 | } |
201 | 201 | $first = $keyName; |
202 | 202 | $last = $localName; |
@@ -228,10 +228,10 @@ discard block |
||
228 | 228 | |
229 | 229 | $keyName = $isBelong ? $foo->$fkMethodName() : $foo->$fkMethodAlternate(); |
230 | 230 | $keySegments = explode('.', $keyName); |
231 | - $keyName = $keySegments[count($keySegments) - 1]; |
|
231 | + $keyName = $keySegments[count($keySegments)-1]; |
|
232 | 232 | $localRaw = $isBelong ? $foo->$rkMethodName() : $foo->$rkMethodAlternate(); |
233 | 233 | $localSegments = explode('.', $localRaw); |
234 | - $localName = $localSegments[count($localSegments) - 1]; |
|
234 | + $localName = $localSegments[count($localSegments)-1]; |
|
235 | 235 | $first = $isBelong ? $localName : $keyName; |
236 | 236 | $last = $isBelong ? $keyName : $localName; |
237 | 237 | $this->addRelationsHook($hooks, $first, $property, $last, $mult, $targ); |
@@ -260,10 +260,10 @@ discard block |
||
260 | 260 | |
261 | 261 | $keyRaw = $isMany ? $foo->$fkMethodName() : $foo->$fkMethodAlternate(); |
262 | 262 | $keySegments = explode('.', $keyRaw); |
263 | - $keyName = $keySegments[count($keySegments) - 1]; |
|
263 | + $keyName = $keySegments[count($keySegments)-1]; |
|
264 | 264 | $localRaw = $isMany ? $foo->$rkMethodName() : $foo->$rkMethodAlternate(); |
265 | 265 | $localSegments = explode('.', $localRaw); |
266 | - $localName = $localSegments[count($localSegments) - 1]; |
|
266 | + $localName = $localSegments[count($localSegments)-1]; |
|
267 | 267 | $first = $isMany ? $keyName : $localName; |
268 | 268 | $last = $isMany ? $localName : $keyName; |
269 | 269 | $this->addRelationsHook($hooks, $first, $property, $last, $mult, $targ, 'unknown'); |
@@ -291,10 +291,10 @@ discard block |
||
291 | 291 | |
292 | 292 | $keyRaw = $isMany ? $foo->$fkMethodName() : $foo->$fkMethodAlternate(); |
293 | 293 | $keySegments = explode('.', $keyRaw); |
294 | - $keyName = $keySegments[count($keySegments) - 1]; |
|
294 | + $keyName = $keySegments[count($keySegments)-1]; |
|
295 | 295 | $localRaw = $isMany ? $foo->$rkMethodName() : $foo->$rkMethodAlternate(); |
296 | 296 | $localSegments = explode('.', $localRaw); |
297 | - $localName = $localSegments[count($localSegments) - 1]; |
|
297 | + $localName = $localSegments[count($localSegments)-1]; |
|
298 | 298 | |
299 | 299 | $first = $keyName; |
300 | 300 | $last = (isset($localName) && '' != $localName) ? $localName : $foo->getRelated()->getKeyName(); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | $values = $skipToken->getOrderByKeysInToken(); |
37 | 37 | $numValues = count($values); |
38 | 38 | if ($numValues != count($segments)) { |
39 | - $msg = 'Expected '.count($segments).', got '.$numValues; |
|
39 | + $msg = 'Expected ' . count($segments) . ', got ' . $numValues; |
|
40 | 40 | throw new InvalidOperationException($msg); |
41 | 41 | } |
42 | 42 |
@@ -118,10 +118,10 @@ |
||
118 | 118 | /** @var string|null $queryParameterString */ |
119 | 119 | $queryParameterString = null; |
120 | 120 | foreach ([ODataConstants::HTTPQUERY_STRING_FILTER, |
121 | - ODataConstants::HTTPQUERY_STRING_EXPAND, |
|
122 | - ODataConstants::HTTPQUERY_STRING_ORDERBY, |
|
123 | - ODataConstants::HTTPQUERY_STRING_INLINECOUNT, |
|
124 | - ODataConstants::HTTPQUERY_STRING_SELECT, ] as $queryOption) { |
|
121 | + ODataConstants::HTTPQUERY_STRING_EXPAND, |
|
122 | + ODataConstants::HTTPQUERY_STRING_ORDERBY, |
|
123 | + ODataConstants::HTTPQUERY_STRING_INLINECOUNT, |
|
124 | + ODataConstants::HTTPQUERY_STRING_SELECT, ] as $queryOption) { |
|
125 | 125 | /** @var string|null $value */ |
126 | 126 | $value = $this->getService()->getHost()->getQueryStringItem($queryOption); |
127 | 127 | if (null !== $value) { |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $targClass = $resourceType->getInstanceType()->getName(); |
129 | 129 | if (!($res instanceof $targClass)) { |
130 | 130 | $msg = 'Object being serialised not instance of expected class, ' |
131 | - . $targClass . ', is actually ' . $payloadClass; |
|
131 | + . $targClass . ', is actually ' . $payloadClass; |
|
132 | 132 | throw new InvalidOperationException($msg); |
133 | 133 | } |
134 | 134 | |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | if (!(ResourcePropertyKind::RESOURCESET_REFERENCE == $propKind |
668 | 668 | || ResourcePropertyKind::RESOURCE_REFERENCE == $propKind)) { |
669 | 669 | $msg = '$propKind != ResourcePropertyKind::RESOURCESET_REFERENCE &&' |
670 | - . ' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE'; |
|
670 | + . ' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE'; |
|
671 | 671 | throw new InvalidOperationException($msg); |
672 | 672 | } |
673 | 673 | $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed'; |