@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | return new GeneratedCollection( |
41 | - [ new GeneratedItem( |
|
41 | + [new GeneratedItem( |
|
42 | 42 | GeneratedItem::TYPE_SEED, |
43 | 43 | $this->generateString(), |
44 | 44 | $this->getGenerateFilename() |
@@ -101,6 +101,6 @@ discard block |
||
101 | 101 | |
102 | 102 | public function getGenerateFilename(): string |
103 | 103 | { |
104 | - return $this->getBasePath('database/seeds/'. $this->studlyName . 'Seeder.php'); |
|
104 | + return $this->getBasePath('database/seeds/' . $this->studlyName . 'Seeder.php'); |
|
105 | 105 | } |
106 | 106 | } |
@@ -68,7 +68,7 @@ |
||
68 | 68 | |
69 | 69 | // get the title field |
70 | 70 | $titleField = $targetModel->firstField( |
71 | - function (Field $field) { |
|
71 | + function(Field $field) { |
|
72 | 72 | return $field->getRenderable('title', false); |
73 | 73 | } |
74 | 74 | ); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | MigrationGenerator $generator, |
15 | 15 | \GraphQL\Language\AST\DirectiveNode $directive |
16 | 16 | ): void { |
17 | - $generator->createCode[] ='$table->softDeletes();'; |
|
17 | + $generator->createCode[] = '$table->softDeletes();'; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | public static function processMigrationFieldDirective( |
@@ -26,9 +26,9 @@ |
||
26 | 26 | $value = $arg->value->value; |
27 | 27 | |
28 | 28 | switch ($arg->name->value) { |
29 | - case 'class': |
|
30 | - $generator->parentClassName = $value; |
|
31 | - break; |
|
29 | + case 'class': |
|
30 | + $generator->parentClassName = $value; |
|
31 | + break; |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | MigrationGenerator $generator, |
15 | 15 | \GraphQL\Language\AST\DirectiveNode $directive |
16 | 16 | ): void { |
17 | - $generator->createCode[] ='$table->timestamps();'; |
|
17 | + $generator->createCode[] = '$table->timestamps();'; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | public static function processMigrationFieldDirective( |
@@ -15,7 +15,7 @@ |
||
15 | 15 | \GraphQL\Language\AST\DirectiveNode $directive |
16 | 16 | ): void { |
17 | 17 | /** @phpstan-ignore-next-line */ |
18 | - $generator->createCode[] = '$table->spatialIndex("' . $directive->arguments[0]->value->value .'");'; |
|
18 | + $generator->createCode[] = '$table->spatialIndex("' . $directive->arguments[0]->value->value . '");'; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | public static function processMigrationFieldDirective( |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | * @var ObjectType $object |
62 | 62 | */ |
63 | 63 | |
64 | - if (str_starts_with((string)$name, '__')) { |
|
64 | + if (str_starts_with((string) $name, '__')) { |
|
65 | 65 | // internal type |
66 | 66 | continue; |
67 | 67 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | continue; |
74 | 74 | } |
75 | 75 | |
76 | - $methodName = $generator->getInflector()->pluralize(mb_strtolower((string)$name)); |
|
76 | + $methodName = $generator->getInflector()->pluralize(mb_strtolower((string) $name)); |
|
77 | 77 | $generator->class->addMethod($methodName) |
78 | 78 | ->setReturnType('\\Illuminate\\Database\\Eloquent\\Relations\\MorphToMany') |
79 | 79 | ->setPublic() |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | public static function getGeneratorDirectiveNamespaces(): array |
37 | 37 | { |
38 | 38 | return array_map( |
39 | - function ($i) { |
|
39 | + function($i) { |
|
40 | 40 | return $i . '\\Laravel\\Directives'; |
41 | 41 | }, |
42 | 42 | self::$directiveLaravelLibraries |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | public static function getGeneratorLighthouseDirectiveNamespaces(): array |
52 | 52 | { |
53 | 53 | return array_map( |
54 | - function ($i) { |
|
54 | + function($i) { |
|
55 | 55 | return $i . '\\Laravel\\Lighthouse\\Directives'; |
56 | 56 | }, |
57 | 57 | self::$directiveLaravelLibraries |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $graphqlQuery = array_merge( |
84 | 84 | $graphqlQuery, |
85 | 85 | $formulariumModel->mapFields( |
86 | - function (Field $f) use ($recurseLevel) { |
|
86 | + function(Field $f) use ($recurseLevel) { |
|
87 | 87 | $type = $f->getDatatype(); |
88 | 88 | if ($type instanceof Datatype_relationship && !$type->getIsInverse()) { |
89 | 89 | return ''; |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | */ |
101 | 101 | $formulariumModel = call_user_func("$model::getFormularium"); /** @phpstan-ignore-line */ |
102 | 102 | $graphqlQuery = $formulariumModel->mapFields( |
103 | - function (Field $f) use ($recurseLevel) { |
|
104 | - return \Modelarium\Frontend\Util::fieldShow($f) ? $f->toGraphqlQuery([self::RECURSE => $recurseLevel-1]) : null; |
|
103 | + function(Field $f) use ($recurseLevel) { |
|
104 | + return \Modelarium\Frontend\Util::fieldShow($f) ? $f->toGraphqlQuery([self::RECURSE => $recurseLevel - 1]) : null; |
|
105 | 105 | } |
106 | 106 | ); |
107 | 107 | array_unshift($graphqlQuery, 'id'); |