@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $writtenFiles = $this->writeFiles( |
| 82 | 82 | $collection, |
| 83 | 83 | $basepath, |
| 84 | - (bool)$this->option('overwrite') |
|
| 84 | + (bool) $this->option('overwrite') |
|
| 85 | 85 | ); |
| 86 | 86 | $this->info('Files generated.'); |
| 87 | 87 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | // this runs all prettier commands in parallel. |
| 98 | 98 | $run = array_reduce( |
| 99 | 99 | $writtenFiles, |
| 100 | - function ($carry, $f) use ($command) { |
|
| 100 | + function($carry, $f) use ($command) { |
|
| 101 | 101 | return $carry . '(' . $command . $f . ') & '; |
| 102 | 102 | } |
| 103 | 103 | ); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | // $blade = FrameworkComposer::getByName('Blade'); |
| 79 | 79 | |
| 80 | 80 | if ($vue !== null) { |
| 81 | - $cardFieldNames = array_map(function (Field $f) { |
|
| 81 | + $cardFieldNames = array_map(function(Field $f) { |
|
| 82 | 82 | return $f->getName(); |
| 83 | 83 | }, $this->cardFields); |
| 84 | 84 | |
@@ -110,12 +110,12 @@ discard block |
||
| 110 | 110 | protected function buildTemplateParameters(): void |
| 111 | 111 | { |
| 112 | 112 | $this->cardFields = $this->model->filterField( |
| 113 | - function (Field $field) { |
|
| 113 | + function(Field $field) { |
|
| 114 | 114 | return $field->getRenderable('card', false); |
| 115 | 115 | } |
| 116 | 116 | ); |
| 117 | 117 | $this->tableFields = $this->model->filterField( |
| 118 | - function (Field $field) { |
|
| 118 | + function(Field $field) { |
|
| 119 | 119 | return $field->getRenderable('table', false); |
| 120 | 120 | } |
| 121 | 121 | ); |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | 'Table', |
| 143 | 143 | [ |
| 144 | 144 | Table::ROW_NAMES => array_map( |
| 145 | - function (Field $field) { |
|
| 145 | + function(Field $field) { |
|
| 146 | 146 | return $field->getRenderable(Renderable::LABEL, $field->getName()); |
| 147 | 147 | }, |
| 148 | 148 | $this->cardFields |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | true |
| 160 | 160 | ); |
| 161 | 161 | $titleFields = $this->model->filterField( |
| 162 | - function (Field $field) { |
|
| 162 | + function(Field $field) { |
|
| 163 | 163 | return $field->getRenderable('title', false); |
| 164 | 164 | } |
| 165 | 165 | ); |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | ), |
| 175 | 175 | 'buttonCreate' => $buttonCreate, |
| 176 | 176 | 'tablelist' => $table->getRenderHTML(), |
| 177 | - 'tableItemFields' => array_keys(array_map(function (Field $f) { |
|
| 177 | + 'tableItemFields' => array_keys(array_map(function(Field $f) { |
|
| 178 | 178 | return $f->getName(); |
| 179 | 179 | }, $this->tableFields)), |
| 180 | 180 | 'titleField' => array_key_first($titleFields) ?: 'id' |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | |
| 203 | 203 | if ($mode == 'editable') { |
| 204 | 204 | $vue->setEditableTemplate( |
| 205 | - function (FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
| 205 | + function(FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
| 206 | 206 | return $this->templateCallback($stub, $vue, $data, $m); |
| 207 | 207 | } |
| 208 | 208 | ); |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | ); |
| 217 | 217 | } else { |
| 218 | 218 | $vue->setViewableTemplate( |
| 219 | - function (FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
| 219 | + function(FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
| 220 | 220 | return $this->templateCallback($stub, $vue, $data, $m); |
| 221 | 221 | } |
| 222 | 222 | ); |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | protected function makeGraphql(): void |
| 241 | 241 | { |
| 242 | 242 | $cardFieldNames = array_map( |
| 243 | - function (Field $field) { |
|
| 243 | + function(Field $field) { |
|
| 244 | 244 | return $field->getName(); |
| 245 | 245 | }, |
| 246 | 246 | $this->cardFields |
@@ -322,14 +322,14 @@ discard block |
||
| 322 | 322 | ]; |
| 323 | 323 | |
| 324 | 324 | $import = array_map( |
| 325 | - function ($i) use ($name) { |
|
| 325 | + function($i) use ($name) { |
|
| 326 | 326 | return "import {$name}$i from './{$name}$i.vue';"; |
| 327 | 327 | }, |
| 328 | 328 | $items |
| 329 | 329 | ); |
| 330 | 330 | |
| 331 | 331 | $export = array_map( |
| 332 | - function ($i) use ($name) { |
|
| 332 | + function($i) use ($name) { |
|
| 333 | 333 | return " {$name}$i,\n"; |
| 334 | 334 | }, |
| 335 | 335 | $items |