Completed
Branch master (8f4d7f)
by Alex
13:09
created
src/Providers/MetadataProvider.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
     private function implement(Map $objectModel)
130 130
     {
131 131
         $meta = App::make('metadata');
132
-        $namespace = $meta->getContainerNamespace().'.';
132
+        $namespace = $meta->getContainerNamespace() . '.';
133 133
 
134 134
         $entities = $objectModel->getEntities();
135 135
         foreach ($entities as $entity) {
@@ -144,13 +144,13 @@  discard block
 block discarded – undo
144 144
             $entity->setOdataResourceType($entityType);
145 145
             $this->implementProperties($entity);
146 146
             $meta->addResourceSet($pluralName, $entityType);
147
-            $meta->oDataEntityMap[$className] = $meta->oDataEntityMap[$namespace.$entityName];
147
+            $meta->oDataEntityMap[$className] = $meta->oDataEntityMap[$namespace . $entityName];
148 148
         }
149 149
         $metaCount = count($meta->oDataEntityMap);
150 150
         $entityCount = count($entities);
151 151
         $expected = 2 * $entityCount;
152 152
         if ($metaCount != $expected) {
153
-            $msg = 'Expected ' . $expected . ' items, actually got '.$metaCount;
153
+            $msg = 'Expected ' . $expected . ' items, actually got ' . $metaCount;
154 154
             throw new InvalidOperationException($msg);
155 155
         }
156 156
 
@@ -235,8 +235,7 @@  discard block
 block discarded – undo
235 235
 
236 236
             $default = $field->getDefaultValue();
237 237
             $isFieldBool = TypeCode::BOOLEAN == $field->getEdmFieldType();
238
-            $default = $isFieldBool ? ($default ? 'true' : 'false') :
239
-                             is_array($default) ? json_encode($default) : strval($default);
238
+            $default = $isFieldBool ? ($default ? 'true' : 'false') : is_array($default) ? json_encode($default) : strval($default);
240 239
 
241 240
             $meta->addPrimitiveProperty(
242 241
                 $odataEntity,
Please login to merge, or discard this patch.
src/Models/MetadataTrait.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -249,17 +249,17 @@
 block discarded – undo
249 249
                             throw new InvalidOperationException($msg);
250 250
                         }
251 251
                         foreach ([
252
-                                     'hasMany',
253
-                                     'hasManyThrough',
254
-                                     'belongsToMany',
255
-                                     'hasOne',
256
-                                     'belongsTo',
257
-                                     'morphOne',
258
-                                     'morphTo',
259
-                                     'morphMany',
260
-                                     'morphToMany',
261
-                                     'morphedByMany'
262
-                                 ] as $relation) {
252
+                                        'hasMany',
253
+                                        'hasManyThrough',
254
+                                        'belongsToMany',
255
+                                        'hasOne',
256
+                                        'belongsTo',
257
+                                        'morphOne',
258
+                                        'morphTo',
259
+                                        'morphMany',
260
+                                        'morphToMany',
261
+                                        'morphedByMany'
262
+                                    ] as $relation) {
263 263
                             $search = '$this->' . $relation . '(';
264 264
                             if (stripos(/* @scrutinizer ignore-type */$code, $search)) {
265 265
                                 //Resolve the relation's model to a Relation object.
Please login to merge, or discard this patch.