@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $graphqlQuery = array_merge( |
| 91 | 91 | $graphqlQuery, |
| 92 | 92 | $formulariumModel->mapFields( |
| 93 | - function (Field $f) use ($generator, $method, $recurseLevel) { |
|
| 93 | + function(Field $f) use ($generator, $method, $recurseLevel) { |
|
| 94 | 94 | $type = $f->getDatatype(); |
| 95 | 95 | if ($type instanceof Datatype_relationship && !$type->getIsInverse()) { |
| 96 | 96 | return ''; |
@@ -117,11 +117,11 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | $formulariumModel = call_user_func("$model::getFormularium"); /** @phpstan-ignore-line */ |
| 119 | 119 | $graphqlQuery = $formulariumModel->mapFields( |
| 120 | - function (Field $f) use ($generator, $method, $recurseLevel) { |
|
| 120 | + function(Field $f) use ($generator, $method, $recurseLevel) { |
|
| 121 | 121 | $extradata = new Extradata( |
| 122 | 122 | self::RECURSE, |
| 123 | 123 | [ |
| 124 | - new ExtradataParameter('value', $recurseLevel-1) |
|
| 124 | + new ExtradataParameter('value', $recurseLevel - 1) |
|
| 125 | 125 | ] |
| 126 | 126 | ); |
| 127 | 127 | |
@@ -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->variable($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->variable($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->variable($f) : null; |
| 498 | 498 | } |
| 499 | 499 | ); |