Completed
Pull Request — master (#137)
by Christopher
02:48
created
src/Models/MetadataGubbinsHolder.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Query/LaravelReadQuery.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
             return null;
374 374
         }
375 375
         assert($result instanceof Model, get_class($result));
376
-        if($targetProperty->getResourceType()->getInstanceType()->getName() != get_class($result)){
376
+        if($targetProperty->getResourceType()->getInstanceType()->getName() != get_class($result)) {
377 377
             return null;
378 378
         }
379 379
         return $result;
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
             assert(is_string($line), 'Eager-load elements must be non-empty strings');
488 488
             $lineParts = explode("/",$line);
489 489
             $numberOfParts = count($lineParts);
490
-            for($i = 0; $i<$numberOfParts;$i++){
490
+            for($i = 0; $i<$numberOfParts;$i++) {
491 491
                 $lineParts[$i] = $this->getLaravelRelationName($lineParts[$i]);
492 492
             }
493 493
             $remixLine = implode(".",$lineParts);
@@ -496,10 +496,11 @@  discard block
 block discarded – undo
496 496
         return $rawLoad;
497 497
     }
498 498
 
499
-    private function getLaravelRelationName($odataProperty){
499
+    private function getLaravelRelationName($odataProperty)
500
+    {
500 501
         $laravelProperty = $odataProperty;
501 502
         $pos = strrpos($laravelProperty, "_");
502
-        if($pos !== false){
503
+        if($pos !== false) {
503 504
             $laravelProperty = substr($laravelProperty,0,$pos);
504 505
         }
505 506
         return $laravelProperty;
Please login to merge, or discard this patch.