@@ -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'; |
|
@@ -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; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | app('locale')->getOption(['time', 'dateStringFormatShort']) |
| 36 | 36 | ); |
| 37 | 37 | if ($value) { |
| 38 | - $value .= ' ('.$this->getAgeString($model).')'; |
|
| 38 | + $value .= ' (' . $this->getAgeString($model) . ')'; |
|
| 39 | 39 | } |
| 40 | 40 | } |
| 41 | 41 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function getAgeString($model) |
| 55 | 55 | { |
| 56 | - return $this->getAge($model).' '.translator()->trans('years'); |
|
| 56 | + return $this->getAge($model) . ' ' . translator()->trans('years'); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -118,6 +118,6 @@ |
||
| 118 | 118 | */ |
| 119 | 119 | public function getFormName() |
| 120 | 120 | { |
| 121 | - return $this->getName().'-'.sha1($this->getItem()->id); |
|
| 121 | + return $this->getName() . '-' . sha1($this->getItem()->id); |
|
| 122 | 122 | } |
| 123 | 123 | } |