Passed
Push — master ( 011cd7...1f2ec0 )
by Bruno
05:44
created
Modelarium/Parser.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     {
179 179
         $originalTypeLoader = $this->schema->getConfig()->typeLoader;
180 180
 
181
-        $this->schema->getConfig()->typeLoader = function ($typeName) use ($originalTypeLoader) {
181
+        $this->schema->getConfig()->typeLoader = function($typeName) use ($originalTypeLoader) {
182 182
             $type = $originalTypeLoader($typeName);
183 183
             if ($type instanceof \GraphQL\Type\Definition\CustomScalarType) {
184 184
                 $scalarName = $type->name;
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     {
194 194
         $this->ast = Visitor::visit($this->ast, [
195 195
             // load the scalar type classes
196
-            NodeKind::SCALAR_TYPE_DEFINITION => function ($node) {
196
+            NodeKind::SCALAR_TYPE_DEFINITION => function($node) {
197 197
                 $scalarName = $node->name->value;
198 198
 
199 199
                 if (in_array($scalarName, ['BuilderValue', 'CanArgs', 'EnumValue', 'EqValue'])) {
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 
212 212
                             switch ($arg->name->value) {
213 213
                             case 'class':
214
-                                $className = (string)$value;
214
+                                $className = (string) $value;
215 215
                             break;
216 216
                             }
217 217
                         }
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
             return [];
258 258
         }
259 259
         return array_map(
260
-            function ($i) use ($basedir) {
260
+            function($i) use ($basedir) {
261 261
                 $name = $i[1];
262 262
                 if (array_key_exists($name, $this->imports)) {
263 263
                     return $this->imports[$name];
Please login to merge, or discard this patch.
Modelarium/Laravel/Targets/MigrationGenerator.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
                 'enum',
231 231
                 'App\\Datatypes',
232 232
                 'Tests\\Unit',
233
-                function (ClassType $enumClass) use ($enumValues) {
233
+                function(ClassType $enumClass) use ($enumValues) {
234 234
                     $enumClass->addConstant('CHOICES', $enumValues);
235 235
                     $enumClass->getMethod('__construct')->addBody('$this->choices = self::CHOICES;');
236 236
                 }
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
         }
280 280
 
281 281
         $options = []; // TODO: from directives
282
-        $codeFragment->appendBase('$table->'  . $ourType->getLaravelSQLType($fieldName, $options));
282
+        $codeFragment->appendBase('$table->' . $ourType->getLaravelSQLType($fieldName, $options));
283 283
     }
284 284
 
285 285
     /**
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
             $this->getBasePath(
418 418
                 'database/migrations/' .
419 419
                 $this->stamp .
420
-                str_pad((string)(static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema
420
+                str_pad((string) (static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema
421 421
                 '_' . $this->mode . '_' .
422 422
                 $relation .
423 423
                 '_table.php'
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
             $this->getBasePath(
460 460
                 'database/migrations/' .
461 461
                 $this->stamp .
462
-                str_pad((string)(static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema
462
+                str_pad((string) (static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema
463 463
                 '_' . $this->mode . '_' .
464 464
                 $type1 . '_' . $type2 .
465 465
                 '_table.php'
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
         return $this->getBasePath(
505 505
             'database/migrations/' .
506 506
             $this->stamp .
507
-            str_pad((string)(static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema
507
+            str_pad((string) (static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema
508 508
             '_' . $this->mode . '_' .
509 509
             $basename . '_' .
510 510
             str_replace('_', '', $this->stamp) . '_' .
@@ -525,10 +525,10 @@  discard block
 block discarded – undo
525 525
             return true;
526 526
         }
527 527
         $tokens = token_get_all($this->lastMigrationCode);
528
-        for ($i=0,$z=count($tokens); $i<$z; $i++) {
528
+        for ($i = 0, $z = count($tokens); $i < $z; $i++) {
529 529
             if (is_array($tokens[$i]) && $tokens[$i] === T_FUNCTION
530
-                && is_array($tokens[$i+1]) && $tokens[$i+1][0] == T_WHITESPACE
531
-                && is_array($tokens[$i+2]) && $tokens[$i+2][1] == 'up'
530
+                && is_array($tokens[$i + 1]) && $tokens[$i + 1][0] == T_WHITESPACE
531
+                && is_array($tokens[$i + 2]) && $tokens[$i + 2][1] == 'up'
532 532
             ) {
533 533
                 $accumulator = [];
534 534
                 // collect tokens from function head through opening brace
Please login to merge, or discard this patch.