@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | if ($hideDisabled && !$isInAdmin) { |
74 | 74 | continue; |
75 | 75 | } |
76 | - $attribs['label'] .= ' ('.translator()->trans('unavailable').')'; |
|
76 | + $attribs['label'] .= ' (' . translator()->trans('unavailable') . ')'; |
|
77 | 77 | |
78 | 78 | if (!$isInAdmin) { |
79 | 79 | $attribs['disabled'] = 'disabled'; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $this->adminFormAddOptionsFromModel($form, 'select_options_disabled', 'Disabled Options', false); |
99 | 99 | |
100 | 100 | $hideDisabledType = $form->isElementsType('BsRadioGroup') ? 'BsRadioGroup' : 'RadioGroup'; |
101 | - $form->{'add'.$hideDisabledType}('hide_disabled', translator()->trans('hide_disabled'), true); |
|
101 | + $form->{'add' . $hideDisabledType}('hide_disabled', translator()->trans('hide_disabled'), true); |
|
102 | 102 | $form->getElement('hide_disabled') |
103 | 103 | ->addOption('yes', translator()->trans('yes')) |
104 | 104 | ->addOption('no', translator()->trans('no')) |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public static function views($path) |
17 | 17 | { |
18 | - return static::basePath().'/resources/views'.$path; |
|
18 | + return static::basePath() . '/resources/views' . $path; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | public static function basePath(): string |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | public static function config($path) |
27 | 27 | { |
28 | - return static::basePath().'/config'.$path; |
|
28 | + return static::basePath() . '/config' . $path; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | protected function bootFormbuilderFormsControllerTrait() |
25 | 25 | { |
26 | 26 | $this->after( |
27 | - function () { |
|
27 | + function() { |
|
28 | 28 | $this->registerFormbuilderViewPaths(); |
29 | 29 | } |
30 | 30 | ); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | 'paths' => [ |
24 | 24 | 'form-builder' => [ |
25 | 25 | 'namespace' => 'ByTIC\FormBuilder\Fields', |
26 | - 'path' => PathsHelpers::basePath().'/src/FormFields/Types', |
|
26 | + 'path' => PathsHelpers::basePath() . '/src/FormFields/Types', |
|
27 | 27 | ], |
28 | 28 | ], |
29 | 29 | ], |
@@ -20,7 +20,7 @@ |
||
20 | 20 | public function change() |
21 | 21 | { |
22 | 22 | $table_forms = PackageConfig::tablesForms(); |
23 | - $table_pivot = PackageConfig::tablesForms().'_pivot'; |
|
23 | + $table_pivot = PackageConfig::tablesForms() . '_pivot'; |
|
24 | 24 | |
25 | 25 | $this->table($table_pivot) |
26 | 26 | ->addForeignKey( |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $this->formRepository = $formRepository ?? FormsBuilderModels::forms(); |
26 | 26 | } |
27 | 27 | |
28 | - public static function for(Consumer $consumer) |
|
28 | + public static function for (Consumer $consumer) |
|
29 | 29 | { |
30 | 30 | $action = static::make(); |
31 | 31 | $action->setConsumer($consumer); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | protected function createForm($consumerType) |
60 | 60 | { |
61 | 61 | $form = $this->formRepository->getNew(); |
62 | - $form->name = 'Form '.$this->consumer->getName(); |
|
62 | + $form->name = 'Form ' . $this->consumer->getName(); |
|
63 | 63 | $form->tenant_id = $this->consumer->getTenantId(); |
64 | 64 | $form->tenant = $this->consumer->getTenant(); |
65 | 65 | $form->setConsumerClass($consumerType); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | protected $form; |
14 | 14 | |
15 | - public static function for($form) |
|
15 | + public static function for ($form) |
|
16 | 16 | { |
17 | 17 | $action = static::make(); |
18 | 18 | $action->setForm($form); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | { |
31 | 31 | $action = new static($fieldList); |
32 | 32 | $action->setForm($form); |
33 | - $action->setConsumer(GetConsumerForForm::for($form)->handle()); |
|
33 | + $action->setConsumer(GetConsumerForForm::for ($form)->handle()); |
|
34 | 34 | |
35 | 35 | return $action; |
36 | 36 | } |
@@ -30,7 +30,9 @@ |
||
30 | 30 | { |
31 | 31 | $action = new static($fieldList); |
32 | 32 | $action->setForm($form); |
33 | - $action->setConsumer(GetConsumerForForm::for($form)->handle()); |
|
33 | + $action->setConsumer(GetConsumerForForm::for($form) { |
|
34 | + ->handle()); |
|
35 | + } |
|
34 | 36 | |
35 | 37 | return $action; |
36 | 38 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | |
41 | 41 | public function bootFormTrait() |
42 | 42 | { |
43 | - $this->addCast('metadata', AsMetadataObject::class.':json'); |
|
43 | + $this->addCast('metadata', AsMetadataObject::class . ':json'); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | public function setConsumerClass($consumerClass) |