@@ -13,7 +13,7 @@ |
||
| 13 | 13 | protected function bootPageControllerFormBuilderViewPathsTrait() |
| 14 | 14 | { |
| 15 | 15 | $this->after( |
| 16 | - function () { |
|
| 16 | + function() { |
|
| 17 | 17 | $this->registerFormBuilderViewPaths(); |
| 18 | 18 | } |
| 19 | 19 | ); |
@@ -19,6 +19,6 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | public function getModelNamespace() |
| 21 | 21 | { |
| 22 | - return __NAMESPACE__.'\\'; |
|
| 22 | + return __NAMESPACE__ . '\\'; |
|
| 23 | 23 | } |
| 24 | 24 | } |
@@ -8,9 +8,9 @@ |
||
| 8 | 8 | app()->share('app', new \Nip\Application\Application()); |
| 9 | 9 | app()->share('translator', new \Nip\I18n\Translator('en')); |
| 10 | 10 | |
| 11 | -define('PROJECT_BASE_PATH', __DIR__.'/..'); |
|
| 11 | +define('PROJECT_BASE_PATH', __DIR__ . '/..'); |
|
| 12 | 12 | define('TEST_BASE_PATH', __DIR__); |
| 13 | 13 | define('CURRENT_URL', ''); |
| 14 | -define('TEST_FIXTURE_PATH', __DIR__.DIRECTORY_SEPARATOR.'fixtures'); |
|
| 14 | +define('TEST_FIXTURE_PATH', __DIR__ . DIRECTORY_SEPARATOR . 'fixtures'); |
|
| 15 | 15 | |
| 16 | -require dirname(__DIR__).'/vendor/autoload.php'; |
|
| 16 | +require dirname(__DIR__) . '/vendor/autoload.php'; |
|
@@ -13,6 +13,6 @@ |
||
| 13 | 13 | |
| 14 | 14 | public function migrations(): string |
| 15 | 15 | { |
| 16 | - return dirname(__DIR__).'/migrations/'; |
|
| 16 | + return dirname(__DIR__) . '/migrations/'; |
|
| 17 | 17 | } |
| 18 | 18 | } |
@@ -54,13 +54,13 @@ |
||
| 54 | 54 | $roles = $fieldsManager->getRoles(); |
| 55 | 55 | foreach ($roles as $role) { |
| 56 | 56 | $fields[$role] = $fieldsManager->getTypesByRole($role); |
| 57 | - $fields['existing.'.$role] = []; |
|
| 57 | + $fields['existing.' . $role] = []; |
|
| 58 | 58 | } |
| 59 | 59 | $fields['custom'] = $fieldsManager->getTypesByRole('custom'); |
| 60 | 60 | |
| 61 | 61 | $existing = $this->getFormFields(); |
| 62 | 62 | foreach ($existing as $field) { |
| 63 | - $fields['existing.'.$field->getRole()][] = $field; |
|
| 63 | + $fields['existing.' . $field->getRole()][] = $field; |
|
| 64 | 64 | unset($fields[$field->getRole()][$field->getType()->getName()]); |
| 65 | 65 | } |
| 66 | 66 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | protected function generateBasePath() |
| 20 | 20 | { |
| 21 | 21 | return FormBuilder::basePath() |
| 22 | - .DIRECTORY_SEPARATOR.'resources' |
|
| 23 | - .DIRECTORY_SEPARATOR.'views'; |
|
| 22 | + .DIRECTORY_SEPARATOR . 'resources' |
|
| 23 | + .DIRECTORY_SEPARATOR . 'views'; |
|
| 24 | 24 | } |
| 25 | 25 | } |
@@ -17,8 +17,8 @@ |
||
| 17 | 17 | public static function loadAssetContent($path) |
| 18 | 18 | { |
| 19 | 19 | $fullPath = self::basePath() |
| 20 | - .DIRECTORY_SEPARATOR.'resources' |
|
| 21 | - .DIRECTORY_SEPARATOR.'assets' |
|
| 20 | + .DIRECTORY_SEPARATOR . 'resources' |
|
| 21 | + .DIRECTORY_SEPARATOR . 'assets' |
|
| 22 | 22 | .$path; |
| 23 | 23 | if (file_exists($fullPath)) { |
| 24 | 24 | return file_get_contents($fullPath); |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | public function change(): void |
| 24 | 24 | { |
| 25 | - $table_name = PackageConfig::tablesForms().'_pivot'; |
|
| 25 | + $table_name = PackageConfig::tablesForms() . '_pivot'; |
|
| 26 | 26 | $exists = $this->hasTable($table_name); |
| 27 | 27 | if ($exists) { |
| 28 | 28 | return; |
@@ -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->save(); |