@@ -79,7 +79,7 @@ |
||
79 | 79 | */ |
80 | 80 | public function register() |
81 | 81 | { |
82 | - $this->app->singleton('metadataControllers', function ($app) { |
|
82 | + $this->app->singleton('metadataControllers', function($app) { |
|
83 | 83 | return new MetadataControllerContainer(); |
84 | 84 | }); |
85 | 85 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function register() |
26 | 26 | { |
27 | - $this->app->singleton('odataquery', function ($app) { |
|
27 | + $this->app->singleton('odataquery', function($app) { |
|
28 | 28 | return new LaravelQuery(); |
29 | 29 | }); |
30 | 30 | } |
@@ -490,7 +490,7 @@ |
||
490 | 490 | } |
491 | 491 | $outData = $result->getData(); |
492 | 492 | if (is_object($outData)) { |
493 | - $outData = (array)$outData; |
|
493 | + $outData = (array) $outData; |
|
494 | 494 | } |
495 | 495 | |
496 | 496 | if (!is_array($outData)) { |
@@ -301,7 +301,7 @@ |
||
301 | 301 | if (!isset($functionDescription)) { |
302 | 302 | throw new \InvalidArgumentException('onFunctionCallExpression'); |
303 | 303 | } |
304 | - if(!array_key_exists ($functionDescription->name, $this->functionDescriptionParsers)){ |
|
304 | + if (!array_key_exists($functionDescription->name, $this->functionDescriptionParsers)) { |
|
305 | 305 | throw new \InvalidArgumentException('onFunctionCallExpression'); |
306 | 306 | } |
307 | 307 | return $this->functionDescriptionParsers[$functionDescription->name]($params); |
@@ -96,14 +96,14 @@ |
||
96 | 96 | // loop thru, chunk by chunk, to reduce chances of exhausting memory |
97 | 97 | $sourceEntityInstance->chunk( |
98 | 98 | 5000, |
99 | - function ($results) use ($isvalid, &$skipToken, &$resultSet, &$rawCount, $rawTop) { |
|
99 | + function($results) use ($isvalid, &$skipToken, &$resultSet, &$rawCount, $rawTop) { |
|
100 | 100 | // apply filter |
101 | 101 | $results = $results->filter($isvalid); |
102 | 102 | // need to iterate through full result set to find count of items matching filter, |
103 | 103 | // so we can't bail out early |
104 | 104 | $rawCount += $results->count(); |
105 | 105 | // now bolt on filtrate to accumulating result set if we haven't accumulated enough bitz |
106 | - if ($rawTop > $resultSet->count() + $skipToken) { |
|
106 | + if ($rawTop > $resultSet->count()+$skipToken) { |
|
107 | 107 | $resultSet = collect(array_merge($resultSet->all(), $results->all())); |
108 | 108 | $sliceAmount = min($skipToken, $resultSet->count()); |
109 | 109 | $resultSet = $resultSet->slice($sliceAmount); |
@@ -445,10 +445,10 @@ discard block |
||
445 | 445 | |
446 | 446 | $keyRaw = $isBelong ? $foo->$fkMethodName() : $foo->getForeignKeyName(); |
447 | 447 | $keySegments = explode('.', $keyRaw); |
448 | - $keyName = $keySegments[count($keySegments) - 1]; |
|
448 | + $keyName = $keySegments[count($keySegments)-1]; |
|
449 | 449 | $localRaw = $isBelong ? $foo->$rkMethodName() : $foo->getQualifiedParentKeyName(); |
450 | 450 | $localSegments = explode('.', $localRaw); |
451 | - $localName = $localSegments[count($localSegments) - 1]; |
|
451 | + $localName = $localSegments[count($localSegments)-1]; |
|
452 | 452 | $first = $keyName; |
453 | 453 | $last = $localName; |
454 | 454 | $this->addRelationsHook($hooks, $first, $property, $last, $mult, $targ); |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | $keyName = $isBelong ? $foo->getForeignKey() : $foo->getForeignKeyName(); |
472 | 472 | $localRaw = $isBelong ? $foo->getOwnerKey() : $foo->getQualifiedParentKeyName(); |
473 | 473 | $localSegments = explode('.', $localRaw); |
474 | - $localName = $localSegments[count($localSegments) - 1]; |
|
474 | + $localName = $localSegments[count($localSegments)-1]; |
|
475 | 475 | $first = $isBelong ? $localName : $keyName; |
476 | 476 | $last = $isBelong ? $keyName : $localName; |
477 | 477 | $this->addRelationsHook($hooks, $first, $property, $last, $mult, $targ); |
@@ -496,10 +496,10 @@ discard block |
||
496 | 496 | |
497 | 497 | $keyRaw = $isMany ? $foo->$fkMethodName() : $foo->getForeignKeyName(); |
498 | 498 | $keySegments = explode('.', $keyRaw); |
499 | - $keyName = $keySegments[count($keySegments) - 1]; |
|
499 | + $keyName = $keySegments[count($keySegments)-1]; |
|
500 | 500 | $localRaw = $isMany ? $foo->$rkMethodName() : $foo->getQualifiedParentKeyName(); |
501 | 501 | $localSegments = explode('.', $localRaw); |
502 | - $localName = $localSegments[count($localSegments) - 1]; |
|
502 | + $localName = $localSegments[count($localSegments)-1]; |
|
503 | 503 | $first = $isMany ? $keyName : $localName; |
504 | 504 | $last = $isMany ? $localName : $keyName; |
505 | 505 | $this->addRelationsHook($hooks, $first, $property, $last, $mult, $targ); |
@@ -523,10 +523,10 @@ discard block |
||
523 | 523 | |
524 | 524 | $keyRaw = $isMany ? $foo->$fkMethodName() : $foo->getForeignKey(); |
525 | 525 | $keySegments = explode('.', $keyRaw); |
526 | - $keyName = $keySegments[count($keySegments) - 1]; |
|
526 | + $keyName = $keySegments[count($keySegments)-1]; |
|
527 | 527 | $localRaw = $isMany ? $foo->$rkMethodName() : $foo->getQualifiedParentKeyName(); |
528 | 528 | $localSegments = explode('.', $localRaw); |
529 | - $localName = $localSegments[count($localSegments) - 1]; |
|
529 | + $localName = $localSegments[count($localSegments)-1]; |
|
530 | 530 | |
531 | 531 | $first = $keyName; |
532 | 532 | $last = $localName; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | class MetadataProvider extends MetadataBaseProvider |
14 | 14 | { |
15 | - protected $multConstraints = [ '0..1' => ['1'], '1' => ['0..1', '*'], '*' => ['1', '*']]; |
|
15 | + protected $multConstraints = ['0..1' => ['1'], '1' => ['0..1', '*'], '*' => ['1', '*']]; |
|
16 | 16 | protected static $METANAMESPACE = "Data"; |
17 | 17 | |
18 | 18 | /** |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function register() |
77 | 77 | { |
78 | - $this->app->singleton('metadata', function ($app) { |
|
78 | + $this->app->singleton('metadata', function($app) { |
|
79 | 79 | return new SimpleMetadataProvider('Data', self::$METANAMESPACE); |
80 | 80 | }); |
81 | 81 | } |
@@ -188,11 +188,11 @@ discard block |
||
188 | 188 | $dependentProperty = $foreign[$dependentType]['property']; |
189 | 189 | assert( |
190 | 190 | in_array($dependentMult, $this->multConstraints[$principalMult]), |
191 | - "Cannot pair multiplicities " . $dependentMult . " and " . $principalMult |
|
191 | + "Cannot pair multiplicities ".$dependentMult." and ".$principalMult |
|
192 | 192 | ); |
193 | 193 | assert( |
194 | 194 | in_array($principalMult, $this->multConstraints[$dependentMult]), |
195 | - "Cannot pair multiplicities " . $principalMult . " and " . $dependentMult |
|
195 | + "Cannot pair multiplicities ".$principalMult." and ".$dependentMult |
|
196 | 196 | ); |
197 | 197 | // add forward relation |
198 | 198 | $forward = [ |
@@ -247,11 +247,11 @@ discard block |
||
247 | 247 | $dependentProperty = $foreign['property']; |
248 | 248 | assert( |
249 | 249 | in_array($dependentMult, $this->multConstraints[$principalMult]), |
250 | - "Cannot pair multiplicities " . $dependentMult . " and " . $principalMult |
|
250 | + "Cannot pair multiplicities ".$dependentMult." and ".$principalMult |
|
251 | 251 | ); |
252 | 252 | assert( |
253 | 253 | in_array($principalMult, $this->multConstraints[$dependentMult]), |
254 | - "Cannot pair multiplicities " . $principalMult . " and " . $dependentMult |
|
254 | + "Cannot pair multiplicities ".$principalMult." and ".$dependentMult |
|
255 | 255 | ); |
256 | 256 | // add forward relation |
257 | 257 | $forward = [ |