@@ -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) |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | public function migrations(): string |
20 | 20 | { |
21 | - return dirname(__DIR__).'/migrations/'; |
|
21 | + return dirname(__DIR__) . '/migrations/'; |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | protected function registerResources() |
@@ -27,12 +27,12 @@ discard block |
||
27 | 27 | return; |
28 | 28 | } |
29 | 29 | $translator = $this->getContainer()->get('translator'); |
30 | - $folder = dirname(__DIR__).'/resources/lang/'; |
|
30 | + $folder = dirname(__DIR__) . '/resources/lang/'; |
|
31 | 31 | $languages = $this->getContainer()->get('translation.languages'); |
32 | 32 | |
33 | 33 | |
34 | 34 | foreach ($languages as $language) { |
35 | - $path = $folder.$language; |
|
35 | + $path = $folder . $language; |
|
36 | 36 | if (is_dir($path)) { |
37 | 37 | $translator->addResource('php', $path, $language); |
38 | 38 | } |