@@ -23,7 +23,6 @@ |
||
23 | 23 | /** |
24 | 24 | * CreateEntryCommand constructor. |
25 | 25 | * @param $entity |
26 | - * @param array $data |
|
27 | 26 | */ |
28 | 27 | public function __construct($entity, array $input) |
29 | 28 | { |
@@ -28,7 +28,6 @@ |
||
28 | 28 | /** |
29 | 29 | * CreateEntryCommand constructor. |
30 | 30 | * @param $entity |
31 | - * @param array $data |
|
32 | 31 | */ |
33 | 32 | public function __construct($entity, $entry_id, array $input) |
34 | 33 | { |
@@ -23,7 +23,7 @@ |
||
23 | 23 | public function handle(EntityWasCreated $event) |
24 | 24 | { |
25 | 25 | if ((bool) $event->entity->create_table) { |
26 | - Schema::create($event->entity->table_name, function ($table) { |
|
26 | + Schema::create($event->entity->table_name, function($table) { |
|
27 | 27 | $table->increments('id'); |
28 | 28 | $table->timestamps(); |
29 | 29 | $table->softDeletes(); |
@@ -49,7 +49,7 @@ |
||
49 | 49 | protected function setRulesForField($field) |
50 | 50 | { |
51 | 51 | $this->rules[$field->slug] = []; |
52 | - if ((bool)$field->required === true) { |
|
52 | + if ((bool) $field->required === true) { |
|
53 | 53 | array_push($this->rules[$field->slug], 'required'); |
54 | 54 | } |
55 | 55 | // Import the validation rules from the fieldtype Class |
@@ -21,7 +21,7 @@ |
||
21 | 21 | { |
22 | 22 | $field = $event->field; |
23 | 23 | if ($field->create_field) { |
24 | - Schema::table($event->field->entity->getTableName(), function ($table) use ($field) { |
|
24 | + Schema::table($event->field->entity->getTableName(), function($table) use ($field) { |
|
25 | 25 | $table->{$field->getType()->getColumnType()}($field->slug)->nullable()->default($field->default); |
26 | 26 | }); |
27 | 27 | event(new FieldWasCreatedInDb($field)); |
@@ -17,12 +17,12 @@ |
||
17 | 17 | $field = $event->field; |
18 | 18 | $rename = $event->rename; |
19 | 19 | $oldSlug = $event->oldSlug; |
20 | - Schema::table($event->field->entity->getTableName(), function ($table) use ($field, $rename, $oldSlug) { |
|
20 | + Schema::table($event->field->entity->getTableName(), function($table) use ($field, $rename, $oldSlug) { |
|
21 | 21 | if ($rename) { |
22 | 22 | $table->renameColumn($oldSlug, $field->slug); |
23 | 23 | } |
24 | 24 | }); |
25 | - Schema::table($event->field->entity->getTableName(), function ($table) use ($field) { |
|
25 | + Schema::table($event->field->entity->getTableName(), function($table) use ($field) { |
|
26 | 26 | $table->{$field->getType()->getColumnType()}($field->slug)->nullable()->default($field->default)->change(); |
27 | 27 | }); |
28 | 28 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | { |
13 | 13 | $field = $event->field; |
14 | 14 | $entity = EntityModel::find($field['entity_id']); |
15 | - Schema::table($entity->getTableName(), function ($table) use ($field) { |
|
15 | + Schema::table($entity->getTableName(), function($table) use ($field) { |
|
16 | 16 | $table->dropColumn($field['slug']); |
17 | 17 | }); |
18 | 18 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | { |
18 | 18 | if (!is_null($command->order)) { |
19 | 19 | $this->updateCurrentFields($command); |
20 | - } else { |
|
20 | + }else { |
|
21 | 21 | $command = $this->setOrder($command); |
22 | 22 | } |
23 | 23 | return $next($command); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | ->where('order', '>=', $command->order) |
34 | 34 | ->orderBy('order', 'ASC') |
35 | 35 | ->get() |
36 | - ->each(function ($field) { |
|
36 | + ->each(function($field) { |
|
37 | 37 | $field->order = $field->order + 1; |
38 | 38 | $field->save(); |
39 | 39 | }); |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | public function handle($command) |
20 | 20 | { |
21 | - $flow = Flow::create((array)$command); |
|
21 | + $flow = Flow::create((array) $command); |
|
22 | 22 | event(new FlowWasCreated($flow)); |
23 | 23 | return $flow; |
24 | 24 | } |