@@ -74,7 +74,7 @@ |
||
74 | 74 | public static function factoryAll(): array |
75 | 75 | { |
76 | 76 | return array_map( |
77 | - function ($f) { |
|
77 | + function($f) { |
|
78 | 78 | $fName = $f . '\\CodeGenerator'; |
79 | 79 | return new $fName(); |
80 | 80 | }, |
@@ -30,6 +30,6 @@ |
||
30 | 30 | |
31 | 31 | public function field(CodeGenerator $generator, Field $field) |
32 | 32 | { |
33 | - return $field->getName() . ' '. $this->_type($generator); |
|
33 | + return $field->getName() . ' ' . $this->_type($generator); |
|
34 | 34 | } |
35 | 35 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | $renderables = $model->getRenderables(); |
26 | 26 | $r = array_map( |
27 | - function ($name, $value) { |
|
27 | + function($name, $value) { |
|
28 | 28 | $v = $value; |
29 | 29 | if (is_string($value)) { |
30 | 30 | $v = '"' . str_replace('"', '\\"', $value) . '"'; |
@@ -341,7 +341,7 @@ |
||
341 | 341 | public function serialize(): array |
342 | 342 | { |
343 | 343 | $fields = array_map( |
344 | - function (Field $f) { |
|
344 | + function(Field $f) { |
|
345 | 345 | return [ |
346 | 346 | 'datatype' => $f->getDatatype()->getName(), |
347 | 347 | 'validators' => $f->getValidators(), |
@@ -65,7 +65,7 @@ |
||
65 | 65 | { |
66 | 66 | $reflection = new ReflectionClass($codeGenerator); |
67 | 67 | $classes = ClassFinder::getClassesInNamespace($reflection->getNamespaceName()); |
68 | - return array_map(fn ($c) => new $c(), $classes); |
|
68 | + return array_map(fn($c) => new $c(), $classes); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | public static function getDatatypeName(DatatypeGenerator $dg): string |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * @var TypescriptCodeGenerator $generator |
41 | 41 | */ |
42 | 42 | $renderable = array_map( |
43 | - function ($name, $value) { |
|
43 | + function($name, $value) { |
|
44 | 44 | $v = $value; |
45 | 45 | if (is_string($value)) { |
46 | 46 | $v = '"' . str_replace('"', '\\"', $value) . '"'; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $field->getRenderables() |
52 | 52 | ); |
53 | 53 | |
54 | - return $field->getName() . ': ' . $this->getDatatypeName($generator) . |
|
54 | + return $field->getName() . ': ' . $this->getDatatypeName($generator) . |
|
55 | 55 | ($field->getValidatorOption(Datatype::REQUIRED, 'value', false) ? '!' : '') . |
56 | 56 | // TODO: validators |
57 | 57 | ($field->getRenderables() ? " @renderable(\n" . join("\n", $renderable) . "\n)" : '') . |
@@ -17,7 +17,7 @@ |
||
17 | 17 | return implode( |
18 | 18 | ";\n", |
19 | 19 | array_map( |
20 | - fn ($f) => '$table->' . $f, |
|
20 | + fn($f) => '$table->' . $f, |
|
21 | 21 | $this->fields($model) |
22 | 22 | ) |
23 | 23 | ); |