@@ -34,24 +34,24 @@ |
||
34 | 34 | |
35 | 35 | foreach ($directive->arguments as $arg) { |
36 | 36 | switch ($arg->name->value) { |
37 | - case 'ability': |
|
38 | - // @phpstan-ignore-next-line |
|
39 | - $ability = (string)$arg->value->value; |
|
40 | - break; |
|
41 | - case 'find': |
|
42 | - // @phpstan-ignore-next-line |
|
43 | - $find = $arg->value->value; |
|
44 | - break; |
|
45 | - case 'model': |
|
46 | - // @phpstan-ignore-next-line |
|
47 | - $modelName = $arg->value->value; |
|
48 | - break; |
|
49 | - case 'injectArgs': |
|
50 | - $injected = true; |
|
51 | - break; |
|
52 | - case 'args': |
|
53 | - $args = true; |
|
54 | - break; |
|
37 | + case 'ability': |
|
38 | + // @phpstan-ignore-next-line |
|
39 | + $ability = (string)$arg->value->value; |
|
40 | + break; |
|
41 | + case 'find': |
|
42 | + // @phpstan-ignore-next-line |
|
43 | + $find = $arg->value->value; |
|
44 | + break; |
|
45 | + case 'model': |
|
46 | + // @phpstan-ignore-next-line |
|
47 | + $modelName = $arg->value->value; |
|
48 | + break; |
|
49 | + case 'injectArgs': |
|
50 | + $injected = true; |
|
51 | + break; |
|
52 | + case 'args': |
|
53 | + $args = true; |
|
54 | + break; |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | switch ($arg->name->value) { |
37 | 37 | case 'ability': |
38 | 38 | // @phpstan-ignore-next-line |
39 | - $ability = (string)$arg->value->value; |
|
39 | + $ability = (string) $arg->value->value; |
|
40 | 40 | break; |
41 | 41 | case 'find': |
42 | 42 | // @phpstan-ignore-next-line |
@@ -20,9 +20,9 @@ |
||
20 | 20 | $value = $arg->value->value; |
21 | 21 | |
22 | 22 | switch ($arg->name->value) { |
23 | - case 'class': |
|
24 | - $generator->parentClassName = (string)$value; |
|
25 | - break; |
|
23 | + case 'class': |
|
24 | + $generator->parentClassName = (string)$value; |
|
25 | + break; |
|
26 | 26 | } |
27 | 27 | } |
28 | 28 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | switch ($arg->name->value) { |
23 | 23 | case 'class': |
24 | - $generator->parentClassName = (string)$value; |
|
24 | + $generator->parentClassName = (string) $value; |
|
25 | 25 | break; |
26 | 26 | } |
27 | 27 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | * @param string[] $directiveNamespaces |
79 | 79 | * @return array<string, string> |
80 | 80 | */ |
81 | - public static function getDirectivesGraphql($directiveNamespaces = [ 'Modelarium\Laravel\Lighthouse\Directives' ]): array |
|
81 | + public static function getDirectivesGraphql($directiveNamespaces = ['Modelarium\Laravel\Lighthouse\Directives']): array |
|
82 | 82 | { |
83 | 83 | $directives = []; |
84 | 84 | |
@@ -88,15 +88,15 @@ discard block |
||
88 | 88 | |
89 | 89 | foreach ($classesInNamespace as $class) { |
90 | 90 | $reflection = new \ReflectionClass($class); |
91 | - if (! $reflection->isInstantiable()) { |
|
91 | + if (!$reflection->isInstantiable()) { |
|
92 | 92 | continue; |
93 | 93 | } |
94 | 94 | |
95 | - if (! is_a($class, \Nuwave\Lighthouse\Schema\Directives\BaseDirective::class, true)) { |
|
95 | + if (!is_a($class, \Nuwave\Lighthouse\Schema\Directives\BaseDirective::class, true)) { |
|
96 | 96 | continue; |
97 | 97 | } |
98 | 98 | |
99 | - $name = \Nuwave\Lighthouse\Schema\DirectiveLocator::directiveName((string)$class); |
|
99 | + $name = \Nuwave\Lighthouse\Schema\DirectiveLocator::directiveName((string) $class); |
|
100 | 100 | $directives[$name] = trim($class::definition()); |
101 | 101 | } |
102 | 102 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | * @param string[] $directiveNamespaces |
111 | 111 | * @return string |
112 | 112 | */ |
113 | - public static function getDirectivesGraphqlString($directiveNamespaces = [ 'Modelarium\\Laravel\\Lighthouse\\Directives' ]): string |
|
113 | + public static function getDirectivesGraphqlString($directiveNamespaces = ['Modelarium\\Laravel\\Lighthouse\\Directives']): string |
|
114 | 114 | { |
115 | 115 | return implode("\n\n", self::getDirectivesGraphql($directiveNamespaces)); |
116 | 116 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | if ($name === 'Query' || $name === 'Mutation' || $name === 'Subscription' || $name === 'Can') { |
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 | } |
@@ -178,7 +178,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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]; |
@@ -72,13 +72,13 @@ |
||
72 | 72 | */ |
73 | 73 | Event::listen( |
74 | 74 | RegisterDirectiveNamespaces::class, |
75 | - function (RegisterDirectiveNamespaces $registerDirectiveNamespaces): string { |
|
75 | + function(RegisterDirectiveNamespaces $registerDirectiveNamespaces): string { |
|
76 | 76 | return 'Modelarium\\Laravel\\Lighthouse\\Directives'; |
77 | 77 | } |
78 | 78 | ); |
79 | 79 | Event::listen( |
80 | 80 | RegisterDirectiveNamespaces::class, |
81 | - function (RegisterDirectiveNamespaces $registerDirectiveNamespaces): string { |
|
81 | + function(RegisterDirectiveNamespaces $registerDirectiveNamespaces): string { |
|
82 | 82 | return 'App\\Datatypes\\Types'; |
83 | 83 | } |
84 | 84 | ); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | Button::TYPE => ($hasVueRouter ? 'router-link' : 'a'), |
100 | 100 | Button::ATTRIBUTES => [ |
101 | 101 | $targetAttribute => "/{$routeBase}/edit", |
102 | - ] + ($hasCan ? [ "v-if" => 'can(\'create\')' ]: []), |
|
102 | + ] + ($hasCan ? ["v-if" => 'can(\'create\')'] : []), |
|
103 | 103 | ] |
104 | 104 | )->setContent( |
105 | 105 | '<i class="fa fa-plus"></i> ' . $this->getOptions()->getOption('frontend', 'messages')['addNew'], |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | Button::TYPE => ($hasVueRouter ? 'router-link' : 'a'), |
114 | 114 | Button::ATTRIBUTES => [ |
115 | 115 | $targetAttribute => "'/{$routeBase}/' + model.{$keyAttribute} + '/edit'", |
116 | - ] + ($hasCan ? [ "v-if" => 'can(\'edit\')' ]: []), |
|
116 | + ] + ($hasCan ? ["v-if" => 'can(\'edit\')'] : []), |
|
117 | 117 | ] |
118 | 118 | )->setContent( |
119 | 119 | '<i class="fa fa-pencil"></i> ' . $this->getOptions()->getOption('frontend', 'messages')['edit'], |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | Button::ATTRIBUTES => [ |
130 | 130 | 'href' => '#', |
131 | 131 | '@click.prevent' => 'remove(model.id)', |
132 | - ] + ($hasCan ? [ "v-if" => 'can(\'delete\')' ]: []), |
|
132 | + ] + ($hasCan ? ["v-if" => 'can(\'delete\')'] : []), |
|
133 | 133 | ] |
134 | 134 | )->setContent( |
135 | 135 | '<i class="fa fa-trash"></i> ' . $this->getOptions()->getOption('frontend', 'messages')['delete'], |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $this->generator->templateParameters['options'] = $this->getOptions()->options; |
150 | 150 | |
151 | 151 | $this->generator->templateParameters['tableItemFields'] = |
152 | - array_values(array_map(function (Field $f) { |
|
152 | + array_values(array_map(function(Field $f) { |
|
153 | 153 | $required = $f->getValidator('required', false); |
154 | 154 | if ($f->getDatatype()->getBasetype() === 'relationship') { |
155 | 155 | $name = $f->getName(); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | 'required' => true |
246 | 246 | ] |
247 | 247 | ]; |
248 | - $cardFieldNames = array_map(function (Field $f) { |
|
248 | + $cardFieldNames = array_map(function(Field $f) { |
|
249 | 249 | return $f->getName(); |
250 | 250 | }, $this->generator->getCardFields()); |
251 | 251 | $vueCode->setExtraProps($extraprops); |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | $vueCode = $vue->getVueCode(); |
272 | 272 | // set basic data for vue |
273 | 273 | $vueCode->setExtraProps([]); |
274 | - $cardFieldNames = array_map(function (Field $f) { |
|
274 | + $cardFieldNames = array_map(function(Field $f) { |
|
275 | 275 | return $f->getName(); |
276 | 276 | }, $this->generator->getCardFields()); |
277 | 277 | foreach ($this->generator->getCardFields() as $f) { |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | public function vueTableItem(FrameworkVue $vue): void |
305 | 305 | { |
306 | 306 | $vueCode = $vue->getVueCode(); |
307 | - $tableFieldNames = array_map(function (Field $f) { |
|
307 | + $tableFieldNames = array_map(function(Field $f) { |
|
308 | 308 | return $f->getName(); |
309 | 309 | }, $this->generator->getTableFields()); |
310 | 310 | $vueCode->setExtraProps([]); |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | $vueCode->setExtraProps([]); |
352 | 352 | |
353 | 353 | $createGraphqlVariables = $this->generator->getModel()->mapFields( |
354 | - function (Field $f) { |
|
354 | + function(Field $f) { |
|
355 | 355 | if (!$f->getRenderable('form', true)) { |
356 | 356 | return null; |
357 | 357 | } |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | $vue, |
373 | 373 | 'Form', |
374 | 374 | 'editable', |
375 | - function (Field $f) { |
|
375 | + function(Field $f) { |
|
376 | 376 | if (!$f->getExtradata('modelFillable')) { |
377 | 377 | return false; |
378 | 378 | } |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | |
398 | 398 | if ($mode == 'editable') { |
399 | 399 | $vue->setEditableTemplate( |
400 | - function (FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
400 | + function(FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
401 | 401 | return $this->generator->templateCallback($stub, $vue, $data, $m); |
402 | 402 | } |
403 | 403 | ); |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | ); |
412 | 412 | } else { |
413 | 413 | $vue->setViewableTemplate( |
414 | - function (FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
414 | + function(FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
415 | 415 | return $this->generator->templateCallback($stub, $vue, $data, $m); |
416 | 416 | } |
417 | 417 | ); |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | $path = $this->generator->getModel()->getName() . '/index.js'; |
434 | 434 | $name = $this->generator->getStudlyName(); |
435 | 435 | |
436 | - $contents = function ($basepath, $element) use ($name) { |
|
436 | + $contents = function($basepath, $element) use ($name) { |
|
437 | 437 | $dir = $basepath . '/' . $name; |
438 | 438 | $import = []; |
439 | 439 | $export = []; |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | $path = $this->generator->getModel()->getName() . '/index.dynamic.js'; |
464 | 464 | $name = $this->generator->getStudlyName(); |
465 | 465 | |
466 | - $contents = function ($basepath, $element) use ($name) { |
|
466 | + $contents = function($basepath, $element) use ($name) { |
|
467 | 467 | $dir = $basepath . '/' . $name; |
468 | 468 | $import = []; |
469 | 469 | $export = []; |
@@ -172,28 +172,28 @@ discard block |
||
172 | 172 | $fieldName, |
173 | 173 | 'string', |
174 | 174 | [], |
175 | - [ Datatype::REQUIRED => ['value' => $required ] ] |
|
175 | + [Datatype::REQUIRED => ['value' => $required]] |
|
176 | 176 | ); |
177 | 177 | } elseif ($type instanceof IntType) { |
178 | 178 | $formulariumField = new Field( |
179 | 179 | $fieldName, |
180 | 180 | 'integer', |
181 | 181 | [], |
182 | - [ Datatype::REQUIRED => ['value' => $required ] ] |
|
182 | + [Datatype::REQUIRED => ['value' => $required]] |
|
183 | 183 | ); |
184 | 184 | } elseif ($type instanceof BooleanType) { |
185 | 185 | $formulariumField = new Field( |
186 | 186 | $fieldName, |
187 | 187 | 'boolean', |
188 | 188 | [], |
189 | - [ Datatype::REQUIRED => ['value' => $required ] ] |
|
189 | + [Datatype::REQUIRED => ['value' => $required]] |
|
190 | 190 | ); |
191 | 191 | } elseif ($type instanceof FloatType) { |
192 | 192 | $formulariumField = new Field( |
193 | 193 | $fieldName, |
194 | 194 | 'float', |
195 | 195 | [], |
196 | - [ Datatype::REQUIRED => ['value' => $required ] ] |
|
196 | + [Datatype::REQUIRED => ['value' => $required]] |
|
197 | 197 | ); |
198 | 198 | } elseif ($type instanceof EnumType) { |
199 | 199 | $this->processEnum($field, $type, $codeFragment); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $fieldName, |
216 | 216 | $ourType->getDatatype(), |
217 | 217 | [], |
218 | - [ Datatype::REQUIRED => ['value' => $required ] ] |
|
218 | + [Datatype::REQUIRED => ['value' => $required]] |
|
219 | 219 | ); |
220 | 220 | } elseif ($type instanceof ListOfType) { |
221 | 221 | throw new Exception("Invalid field type: " . get_class($type)); |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | 'enum', |
274 | 274 | 'App\\Datatypes', |
275 | 275 | 'Tests\\Unit', |
276 | - function (ClassType $enumClass) use ($enumValues) { |
|
276 | + function(ClassType $enumClass) use ($enumValues) { |
|
277 | 277 | $enumClass->addConstant('CHOICES', $enumValues); |
278 | 278 | $enumClass->getMethod('__construct')->addBody('$this->choices = self::CHOICES;'); |
279 | 279 | } |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | $this->getBasePath( |
465 | 465 | 'database/migrations/' . |
466 | 466 | $this->stamp . |
467 | - str_pad((string)(static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema |
|
467 | + str_pad((string) (static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema |
|
468 | 468 | '_' . $this->mode . '_' . |
469 | 469 | $relation . |
470 | 470 | '_table.php' |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | $this->getBasePath( |
507 | 507 | 'database/migrations/' . |
508 | 508 | $this->stamp . |
509 | - str_pad((string)(static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema |
|
509 | + str_pad((string) (static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema |
|
510 | 510 | '_' . $this->mode . '_' . |
511 | 511 | $type1 . '_' . $type2 . |
512 | 512 | '_table.php' |
@@ -551,7 +551,7 @@ discard block |
||
551 | 551 | return $this->getBasePath( |
552 | 552 | 'database/migrations/' . |
553 | 553 | $this->stamp . |
554 | - str_pad((string)(static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema |
|
554 | + str_pad((string) (static::$counter++), 3, "0", STR_PAD_LEFT) . // so we keep the same order of types in schema |
|
555 | 555 | '_' . $this->mode . '_' . |
556 | 556 | $basename . '_' . |
557 | 557 | str_replace('_', '', $this->stamp) . '_' . |
@@ -572,10 +572,10 @@ discard block |
||
572 | 572 | return true; |
573 | 573 | } |
574 | 574 | $tokens = token_get_all($this->lastMigrationCode); |
575 | - for ($i=0, $z=count($tokens); $i < $z; $i++) { |
|
575 | + for ($i = 0, $z = count($tokens); $i < $z; $i++) { |
|
576 | 576 | if (is_array($tokens[$i]) && $tokens[$i][0] === T_FUNCTION |
577 | - && is_array($tokens[$i+1]) && $tokens[$i+1][0] == T_WHITESPACE |
|
578 | - && is_array($tokens[$i+2]) && $tokens[$i+2][1] == 'up' |
|
577 | + && is_array($tokens[$i + 1]) && $tokens[$i + 1][0] == T_WHITESPACE |
|
578 | + && is_array($tokens[$i + 2]) && $tokens[$i + 2][1] == 'up' |
|
579 | 579 | ) { |
580 | 580 | $accumulator = []; |
581 | 581 | $braceDepth = 0; |
@@ -155,17 +155,17 @@ discard block |
||
155 | 155 | public function buildTemplateParameters(): void |
156 | 156 | { |
157 | 157 | $this->titleFields = $this->fModel->filterField( |
158 | - function (Field $field) { |
|
158 | + function(Field $field) { |
|
159 | 159 | return $field->getRenderable('title', false); |
160 | 160 | } |
161 | 161 | ); |
162 | 162 | $this->cardFields = $this->fModel->filterField( |
163 | - function (Field $field) { |
|
163 | + function(Field $field) { |
|
164 | 164 | return $field->getRenderable('card', false); |
165 | 165 | } |
166 | 166 | ); |
167 | 167 | $this->tableFields = $this->fModel->filterField( |
168 | - function (Field $field) { |
|
168 | + function(Field $field) { |
|
169 | 169 | return $field->getRenderable('table', false); |
170 | 170 | } |
171 | 171 | ); |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | ], |
180 | 180 | ] |
181 | 181 | )->setContent( |
182 | - '<i class="fa fa-plus"></i> ' . $this->getOptions()->getOption('frontend', 'messages')['addNew'], |
|
182 | + '<i class="fa fa-plus"></i> ' . $this->getOptions()->getOption('frontend', 'messages')['addNew'], |
|
183 | 183 | true, |
184 | 184 | true |
185 | 185 | )->getRenderHTML(); |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | 'Table', |
222 | 222 | [ |
223 | 223 | Table::ROW_NAMES => array_map( |
224 | - function (Field $field) { |
|
224 | + function(Field $field) { |
|
225 | 225 | return $field->getRenderable(Renderable::LABEL, $field->getName()); |
226 | 226 | }, |
227 | 227 | $this->tableFields |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | $t->appendContent('<slot name="extraHeaders" :props="$props"></slot>', true); |
247 | 247 | } |
248 | 248 | $titleFields = $this->fModel->filterField( |
249 | - function (Field $field) { |
|
249 | + function(Field $field) { |
|
250 | 250 | return $field->getRenderable('title', false); |
251 | 251 | } |
252 | 252 | ); |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | 'spinner' => $spinner, |
274 | 274 | 'routeBase' => $this->getRouteBase(), |
275 | 275 | 'tablelist' => $table->getRenderHTML(), |
276 | - 'tableItemFields' => array_keys(array_map(function (Field $f) { |
|
276 | + 'tableItemFields' => array_keys(array_map(function(Field $f) { |
|
277 | 277 | return $f->getName(); |
278 | 278 | }, $this->tableFields)), |
279 | 279 | 'typeTitle' => $this->fModel->getRenderable('name', $this->studlyName), |
@@ -351,13 +351,13 @@ discard block |
||
351 | 351 | $filters[] = [ |
352 | 352 | 'name' => $arg->name, |
353 | 353 | 'type' => $typename, |
354 | - 'graphqlType' => $arg->name . ': ' . |
|
354 | + 'graphqlType' => $arg->name . ': ' . |
|
355 | 355 | ($isArray ? '[' : '') . |
356 | 356 | $typename . |
357 | 357 | $isInternalRequiredString . // TODO: phpstan complains, issue with graphqlphp ($isInternalRequired ? '!' : '') . |
358 | 358 | ($isArray ? ']' : '') . |
359 | 359 | ($isRequired ? '!' : ''), |
360 | - 'required' => (bool)$isRequired, |
|
360 | + 'required' => (bool) $isRequired, |
|
361 | 361 | 'requiredJSBoolean' => $isRequired ? 'true' : 'false' |
362 | 362 | ]; |
363 | 363 | } |
@@ -375,13 +375,13 @@ discard block |
||
375 | 375 | * card |
376 | 376 | */ |
377 | 377 | $cardFieldNames = array_map( |
378 | - function (Field $field) { |
|
378 | + function(Field $field) { |
|
379 | 379 | return $field->getName(); |
380 | 380 | }, |
381 | 381 | $this->cardFields |
382 | 382 | ); |
383 | 383 | $graphqlQuery = $this->fModel->mapFields( |
384 | - function (Field $f) use ($cardFieldNames, $gcg) { |
|
384 | + function(Field $f) use ($cardFieldNames, $gcg) { |
|
385 | 385 | if (in_array($f->getName(), $cardFieldNames)) { |
386 | 386 | // TODO: filter subfields in relationships |
387 | 387 | return $gcg->field($f); |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | $filtersQuery = ', ' . join( |
398 | 398 | ', ', |
399 | 399 | array_map( |
400 | - function ($item) { |
|
400 | + function($item) { |
|
401 | 401 | // TODO: still buggy, misses the internal ! in [Xyz!]! |
402 | 402 | return '$' . $item['graphqlType']; |
403 | 403 | }, |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | $filtersParams = ', ' . join( |
408 | 408 | ', ', |
409 | 409 | array_map( |
410 | - function ($item) { |
|
410 | + function($item) { |
|
411 | 411 | return $item['name'] . ': $' . $item['name']; |
412 | 412 | }, |
413 | 413 | $filters |
@@ -446,14 +446,14 @@ discard block |
||
446 | 446 | * table |
447 | 447 | */ |
448 | 448 | $tableFieldNames = array_map( |
449 | - function (Field $field) { |
|
449 | + function(Field $field) { |
|
450 | 450 | return $field->getName(); |
451 | 451 | }, |
452 | 452 | $this->tableFields |
453 | 453 | ); |
454 | 454 | |
455 | 455 | $graphqlQuery = $this->fModel->mapFields( |
456 | - function (Field $f) use ($tableFieldNames, $gcg) { |
|
456 | + function(Field $f) use ($tableFieldNames, $gcg) { |
|
457 | 457 | if (in_array($f->getName(), $tableFieldNames)) { |
458 | 458 | // TODO: filter subfields in relationships |
459 | 459 | return $gcg->field($f); |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | * item |
494 | 494 | */ |
495 | 495 | $graphqlQuery = $this->fModel->mapFields( |
496 | - function (Field $f) use ($gcg) { |
|
496 | + function(Field $f) use ($gcg) { |
|
497 | 497 | return \Modelarium\Frontend\Util::fieldShow($f) ? $gcg->field($f) : null; |
498 | 498 | } |
499 | 499 | ); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | ($field->getValidatorOption(Datatype::REQUIRED, 'value', false) ? '' : '->nullable()'); |
22 | 22 | // $index = '' $field->getRenderable('index').... |
23 | 23 | return [ |
24 | - $id |
|
24 | + $id |
|
25 | 25 | ]; |
26 | 26 | } |
27 | 27 | } |