@@ -24,7 +24,7 @@ |
||
24 | 24 | $choices = $datatype->getChoices(); |
25 | 25 | |
26 | 26 | $choicesTS = array_map( |
27 | - function ($c) { |
|
27 | + function($c) { |
|
28 | 28 | return " \"$c\" = \"$c\""; |
29 | 29 | }, |
30 | 30 | array_keys($choices) |
@@ -28,12 +28,12 @@ |
||
28 | 28 | { |
29 | 29 | $classes = DatatypeGeneratorFactory::specializedFactoryAll($this); |
30 | 30 | $declarations = array_map( |
31 | - function (DatatypeGenerator $c) { |
|
31 | + function(DatatypeGenerator $c) { |
|
32 | 32 | return $c->datatypeDeclaration($this); |
33 | 33 | }, |
34 | 34 | $classes |
35 | 35 | ); |
36 | - $cleanDeclarations = array_filter($declarations, function ($d) { |
|
36 | + $cleanDeclarations = array_filter($declarations, function($d) { |
|
37 | 37 | return $d; |
38 | 38 | }); |
39 | 39 | return join("\n\n", $cleanDeclarations); |
@@ -13,8 +13,8 @@ |
||
13 | 13 | { |
14 | 14 | try { |
15 | 15 | /** |
16 | - * @var Datatype_enum $datatype |
|
17 | - */ |
|
16 | + * @var Datatype_enum $datatype |
|
17 | + */ |
|
18 | 18 | $datatype = $this->getDatatype(); |
19 | 19 | |
20 | 20 | /** |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $choices = $datatype->getChoices(); |
25 | 25 | |
26 | 26 | $choicesEscaped = array_map( |
27 | - function ($c) { |
|
27 | + function($c) { |
|
28 | 28 | $c = preg_replace("/[^A-Za-z0-9]+/s", "_", $c); |
29 | 29 | return ((ctype_alpha($c[0]) || $c[0] === '_') ? $c : '_' . $c); |
30 | 30 | }, |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | try { |
41 | 41 | $className = get_class($this->getDatatype()); |
42 | 42 | $escapedClassName = str_replace("\\", "\\\\", $className); |
43 | - return 'scalar ' . $this->getDatatypeName($generator) . ' @scalar(class: "'. $escapedClassName . '")'; |
|
43 | + return 'scalar ' . $this->getDatatypeName($generator) . ' @scalar(class: "' . $escapedClassName . '")'; |
|
44 | 44 | } catch (\Throwable $e) { |
45 | 45 | return ''; |
46 | 46 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * @var GraphQLCodeGenerator $generator |
54 | 54 | */ |
55 | 55 | $renderable = array_map( |
56 | - function ($name, $value) { |
|
56 | + function($name, $value) { |
|
57 | 57 | $v = $value; |
58 | 58 | if (is_string($value)) { |
59 | 59 | $v = '"' . str_replace('"', '\\"', $value) . '"'; |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $field->getRenderables() |
65 | 65 | ); |
66 | 66 | |
67 | - return $field->getName() . ': ' . $this->getDatatypeName($generator) . |
|
67 | + return $field->getName() . ': ' . $this->getDatatypeName($generator) . |
|
68 | 68 | ($field->getValidatorOption(Datatype::REQUIRED, 'value', false) ? '!' : '') . |
69 | 69 | // TODO: validators |
70 | 70 | ($field->getRenderables() ? " @renderable(\n" . join("\n", $renderable) . "\n)" : '') . |
@@ -41,7 +41,7 @@ |
||
41 | 41 | $objects = array_merge( |
42 | 42 | $objects, |
43 | 43 | array_map( |
44 | - function ($c) { |
|
44 | + function($c) { |
|
45 | 45 | try { |
46 | 46 | return new $c(); |
47 | 47 | } catch (\Throwable $e) { |