@@ -142,17 +142,17 @@ discard block |
||
142 | 142 | public function buildTemplateParameters(): void |
143 | 143 | { |
144 | 144 | $this->titleFields = $this->fModel->filterField( |
145 | - function (Field $field) { |
|
145 | + function(Field $field) { |
|
146 | 146 | return $field->getRenderable('title', false); |
147 | 147 | } |
148 | 148 | ); |
149 | 149 | $this->cardFields = $this->fModel->filterField( |
150 | - function (Field $field) { |
|
150 | + function(Field $field) { |
|
151 | 151 | return $field->getRenderable('card', false); |
152 | 152 | } |
153 | 153 | ); |
154 | 154 | $this->tableFields = $this->fModel->filterField( |
155 | - function (Field $field) { |
|
155 | + function(Field $field) { |
|
156 | 156 | return $field->getRenderable('table', false); |
157 | 157 | } |
158 | 158 | ); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | 'Table', |
209 | 209 | [ |
210 | 210 | Table::ROW_NAMES => array_map( |
211 | - function (Field $field) { |
|
211 | + function(Field $field) { |
|
212 | 212 | return $field->getRenderable(Renderable::LABEL, $field->getName()); |
213 | 213 | }, |
214 | 214 | $this->tableFields |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | $t->appendContent('<slot name="extraHeaders" :props="$props"></slot>', true); |
234 | 234 | } |
235 | 235 | $titleFields = $this->fModel->filterField( |
236 | - function (Field $field) { |
|
236 | + function(Field $field) { |
|
237 | 237 | return $field->getRenderable('title', false); |
238 | 238 | } |
239 | 239 | ); |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | 'keyAttribute' => $this->keyAttribute, |
260 | 260 | 'spinner' => $spinner, |
261 | 261 | 'tablelist' => $table->getRenderHTML(), |
262 | - 'tableItemFields' => array_keys(array_map(function (Field $f) { |
|
262 | + 'tableItemFields' => array_keys(array_map(function(Field $f) { |
|
263 | 263 | return $f->getName(); |
264 | 264 | }, $this->tableFields)), |
265 | 265 | 'typeTitle' => $this->fModel->getRenderable('name', $this->studlyName), |
@@ -337,13 +337,13 @@ discard block |
||
337 | 337 | $filters[] = [ |
338 | 338 | 'name' => $arg->name, |
339 | 339 | 'type' => $typename, |
340 | - 'graphqlType' => $arg->name . ': ' . |
|
340 | + 'graphqlType' => $arg->name . ': ' . |
|
341 | 341 | ($isArray ? '[' : '') . |
342 | 342 | $typename . |
343 | 343 | $isInternalRequiredString . // TODO: phpstan complains, issue with graphqlphp ($isInternalRequired ? '!' : '') . |
344 | 344 | ($isArray ? ']' : '') . |
345 | 345 | ($isRequired ? '!' : ''), |
346 | - 'required' => (bool)$isRequired, |
|
346 | + 'required' => (bool) $isRequired, |
|
347 | 347 | 'requiredJSBoolean' => $isRequired ? 'true' : 'false' |
348 | 348 | ]; |
349 | 349 | } |
@@ -359,13 +359,13 @@ discard block |
||
359 | 359 | * card |
360 | 360 | */ |
361 | 361 | $cardFieldNames = array_map( |
362 | - function (Field $field) { |
|
362 | + function(Field $field) { |
|
363 | 363 | return $field->getName(); |
364 | 364 | }, |
365 | 365 | $this->cardFields |
366 | 366 | ); |
367 | 367 | $graphqlQuery = $this->fModel->mapFields( |
368 | - function (Field $f) use ($cardFieldNames) { |
|
368 | + function(Field $f) use ($cardFieldNames) { |
|
369 | 369 | if (in_array($f->getName(), $cardFieldNames)) { |
370 | 370 | // TODO: filter subfields in relationships |
371 | 371 | return $f->toGraphqlQuery(); |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | $filtersQuery = ', ' . join( |
382 | 382 | ', ', |
383 | 383 | array_map( |
384 | - function ($item) { |
|
384 | + function($item) { |
|
385 | 385 | // TODO: still buggy, misses the internal ! in [Xyz!]! |
386 | 386 | return '$' . $item['graphqlType']; |
387 | 387 | }, |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | $filtersParams = ', ' . join( |
392 | 392 | ', ', |
393 | 393 | array_map( |
394 | - function ($item) { |
|
394 | + function($item) { |
|
395 | 395 | return $item['name'] . ': $' . $item['name']; |
396 | 396 | }, |
397 | 397 | $filters |
@@ -430,14 +430,14 @@ discard block |
||
430 | 430 | * table |
431 | 431 | */ |
432 | 432 | $tableFieldNames = array_map( |
433 | - function (Field $field) { |
|
433 | + function(Field $field) { |
|
434 | 434 | return $field->getName(); |
435 | 435 | }, |
436 | 436 | $this->tableFields |
437 | 437 | ); |
438 | 438 | |
439 | 439 | $graphqlQuery = $this->fModel->mapFields( |
440 | - function (Field $f) use ($tableFieldNames) { |
|
440 | + function(Field $f) use ($tableFieldNames) { |
|
441 | 441 | if (in_array($f->getName(), $tableFieldNames)) { |
442 | 442 | // TODO: filter subfields in relationships |
443 | 443 | return $f->toGraphqlQuery(); |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | * item |
478 | 478 | */ |
479 | 479 | $graphqlQuery = $this->fModel->mapFields( |
480 | - function (Field $f) { |
|
480 | + function(Field $f) { |
|
481 | 481 | return \Modelarium\Frontend\Util::fieldShow($f) ? $f->toGraphqlQuery() : null; |
482 | 482 | } |
483 | 483 | ); |