@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | $name = $directive->name->value; |
| 302 | 302 | switch ($name) { |
| 303 | 303 | case 'migrationSoftDeletes': |
| 304 | - $this->createCode[] ='$table->softDeletes();'; |
|
| 304 | + $this->createCode[] = '$table->softDeletes();'; |
|
| 305 | 305 | break; |
| 306 | 306 | case 'migrationPrimaryIndex': |
| 307 | 307 | // TODO |
@@ -316,10 +316,10 @@ discard block |
||
| 316 | 316 | if (!count($indexFields)) { |
| 317 | 317 | throw new Exception("You must provide at least one field to an index"); |
| 318 | 318 | } |
| 319 | - $this->createCode[] ='$table->index("' . implode('", "', $indexFields) .'");'; |
|
| 319 | + $this->createCode[] = '$table->index("' . implode('", "', $indexFields) . '");'; |
|
| 320 | 320 | break; |
| 321 | 321 | case 'migrationSpatialIndex': |
| 322 | - $this->createCode[] ='$table->spatialIndex("' . $directive->arguments[0]->value->value .'");'; |
|
| 322 | + $this->createCode[] = '$table->spatialIndex("' . $directive->arguments[0]->value->value . '");'; |
|
| 323 | 323 | break; |
| 324 | 324 | |
| 325 | 325 | case 'migrationFulltextIndex': |
@@ -340,10 +340,10 @@ discard block |
||
| 340 | 340 | "\")');"; |
| 341 | 341 | break; |
| 342 | 342 | case 'migrationRememberToken': |
| 343 | - $this->createCode[] ='$table->rememberToken();'; |
|
| 343 | + $this->createCode[] = '$table->rememberToken();'; |
|
| 344 | 344 | break; |
| 345 | 345 | case 'migrationTimestamps': |
| 346 | - $this->createCode[] ='$table->timestamps();'; |
|
| 346 | + $this->createCode[] = '$table->timestamps();'; |
|
| 347 | 347 | break; |
| 348 | 348 | default: |
| 349 | 349 | } |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | |
| 353 | 353 | public function generateString(): string |
| 354 | 354 | { |
| 355 | - return $this->stubToString('migration', function ($stub) { |
|
| 355 | + return $this->stubToString('migration', function($stub) { |
|
| 356 | 356 | foreach ($this->type->getFields() as $field) { |
| 357 | 357 | $directives = $field->astNode->directives; |
| 358 | 358 | if ( |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | |
| 427 | 427 | public function generateManyToManyMorphTable(string $name, string $relation): GeneratedItem |
| 428 | 428 | { |
| 429 | - $contents = $this->stubToString('migration', function ($stub) use ($name, $relation) { |
|
| 429 | + $contents = $this->stubToString('migration', function($stub) use ($name, $relation) { |
|
| 430 | 430 | $code = <<<EOF |
| 431 | 431 | |
| 432 | 432 | \$table->unsignedBigInteger("{$name}_id"); |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | |
| 473 | 473 | public function generateManyToManyTable(string $type1, string $type2): GeneratedItem |
| 474 | 474 | { |
| 475 | - $contents = $this->stubToString('migration', function ($stub) use ($type1, $type2) { |
|
| 475 | + $contents = $this->stubToString('migration', function($stub) use ($type1, $type2) { |
|
| 476 | 476 | $code = <<<EOF |
| 477 | 477 | |
| 478 | 478 | \$table->increments("id"); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * @param string[] $directiveNamespaces |
| 75 | 75 | * @return array<string, string> |
| 76 | 76 | */ |
| 77 | - public static function getDirectivesGraphql($directiveNamespaces = [ 'Modelarium\Laravel\Lighthouse\Directives' ]): array |
|
| 77 | + public static function getDirectivesGraphql($directiveNamespaces = ['Modelarium\Laravel\Lighthouse\Directives']): array |
|
| 78 | 78 | { |
| 79 | 79 | $directives = []; |
| 80 | 80 | |
@@ -84,15 +84,15 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | foreach ($classesInNamespace as $class) { |
| 86 | 86 | $reflection = new \ReflectionClass($class); |
| 87 | - if (! $reflection->isInstantiable()) { |
|
| 87 | + if (!$reflection->isInstantiable()) { |
|
| 88 | 88 | continue; |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - if (! is_a($class, \Nuwave\Lighthouse\Schema\Directives\BaseDirective::class, true)) { |
|
| 91 | + if (!is_a($class, \Nuwave\Lighthouse\Schema\Directives\BaseDirective::class, true)) { |
|
| 92 | 92 | continue; |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | - $name = DirectiveFactory::directiveName((string)$class); |
|
| 95 | + $name = DirectiveFactory::directiveName((string) $class); |
|
| 96 | 96 | $directives[$name] = trim($class::definition()); |
| 97 | 97 | } |
| 98 | 98 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | * @param string[] $directiveNamespaces |
| 107 | 107 | * @return string |
| 108 | 108 | */ |
| 109 | - public static function getDirectivesGraphqlString($directiveNamespaces = [ 'Modelarium\\Laravel\\Lighthouse\\Directives' ]): string |
|
| 109 | + public static function getDirectivesGraphqlString($directiveNamespaces = ['Modelarium\\Laravel\\Lighthouse\\Directives']): string |
|
| 110 | 110 | { |
| 111 | 111 | return implode("\n\n", self::getDirectivesGraphql($directiveNamespaces)); |
| 112 | 112 | } |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | } elseif ($name === 'Subscription') { |
| 168 | 168 | continue; |
| 169 | 169 | } |
| 170 | - $g = $this->processType((string)$name, $object); |
|
| 170 | + $g = $this->processType((string) $name, $object); |
|
| 171 | 171 | $this->collection = $this->collection->merge($g); |
| 172 | 172 | } |
| 173 | 173 | } |