@@ -157,7 +157,7 @@ |
||
| 157 | 157 | $this->addFeedback('success', strtr($this->translator()->translate('Created Object: {{ objId }}'), [ |
| 158 | 158 | '{{ objId }}' => $obj->id() |
| 159 | 159 | ])); |
| 160 | - $this->addFeedbackFromValidation($obj, [ ModelValidator::NOTICE, ModelValidator::WARNING ]); |
|
| 160 | + $this->addFeedbackFromValidation($obj, [ModelValidator::NOTICE, ModelValidator::WARNING]); |
|
| 161 | 161 | $this->setSuccess(true); |
| 162 | 162 | |
| 163 | 163 | return $response; |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | return [ |
| 54 | 54 | 'layout' => [ |
| 55 | 55 | 'structure' => [ |
| 56 | - [ 'columns' => [ 0 ] ] |
|
| 56 | + ['columns' => [0]] |
|
| 57 | 57 | ] |
| 58 | 58 | ], |
| 59 | 59 | 'widgets' => [ |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | return [ |
| 54 | 54 | 'layout' => [ |
| 55 | 55 | 'structure' => [ |
| 56 | - [ 'columns' => [ 0 ] ] |
|
| 56 | + ['columns' => [0]] |
|
| 57 | 57 | ] |
| 58 | 58 | ], |
| 59 | 59 | 'widgets' => [ |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | return [ |
| 54 | 54 | 'layout' => [ |
| 55 | 55 | 'structure' => [ |
| 56 | - [ 'columns' => [ 0 ] ] |
|
| 56 | + ['columns' => [0]] |
|
| 57 | 57 | ] |
| 58 | 58 | ], |
| 59 | 59 | 'widgets' => [ |
@@ -64,11 +64,11 @@ |
||
| 64 | 64 | $choice['group'] = null; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - if (is_callable([ $obj, 'name' ])) { |
|
| 67 | + if (is_callable([$obj, 'name'])) { |
|
| 68 | 68 | $choice['title'] = $obj->name(); |
| 69 | - } elseif (is_callable([ $obj, 'label' ])) { |
|
| 69 | + } elseif (is_callable([$obj, 'label'])) { |
|
| 70 | 70 | $choice['title'] = $obj->label(); |
| 71 | - } elseif (is_callable([ $obj, 'title' ])) { |
|
| 71 | + } elseif (is_callable([$obj, 'title'])) { |
|
| 72 | 72 | $choice['title'] = $obj->title(); |
| 73 | 73 | } |
| 74 | 74 | |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | { |
| 157 | 157 | $this->logger->warning( |
| 158 | 158 | 'MapWidget "lon_property" is deprecated. Use "lng_property".', |
| 159 | - [ 'package' => 'locomotivemtl/charcoal-admin' ] |
|
| 159 | + ['package' => 'locomotivemtl/charcoal-admin'] |
|
| 160 | 160 | ); |
| 161 | 161 | $this->setLngProperty($key); |
| 162 | 162 | return $this; |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | { |
| 269 | 269 | $this->logger->warning( |
| 270 | 270 | 'MapWidget "lon" is deprecated. Use "lng".', |
| 271 | - [ 'package' => 'locomotivemtl/charcoal-admin' ] |
|
| 271 | + ['package' => 'locomotivemtl/charcoal-admin'] |
|
| 272 | 272 | ); |
| 273 | 273 | return $this->lng(); |
| 274 | 274 | } |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | $lng = $this->lng(); |
| 285 | 285 | |
| 286 | 286 | if ($lat && $lng) { |
| 287 | - return [ $lat, $lng ]; |
|
| 287 | + return [$lat, $lng]; |
|
| 288 | 288 | } else { |
| 289 | 289 | return null; |
| 290 | 290 | } |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | $lng = $this->lng(); |
| 302 | 302 | |
| 303 | 303 | if ($lat && $lng) { |
| 304 | - return [ 'lat' => $lat, 'lng' => $lng ]; |
|
| 304 | + return ['lat' => $lat, 'lng' => $lng]; |
|
| 305 | 305 | } else { |
| 306 | 306 | return null; |
| 307 | 307 | } |
@@ -195,7 +195,7 @@ |
||
| 195 | 195 | $this->translator()->translate('Username can not be empty.') |
| 196 | 196 | ); |
| 197 | 197 | } |
| 198 | - $user = $this->modelFactory()->create(User::class); |
|
| 198 | + $user = $this->modelFactory()->create(User::class); |
|
| 199 | 199 | $user->load($username); |
| 200 | 200 | if ($user->username()) { |
| 201 | 201 | throw new Exception(sprintf( |
@@ -159,7 +159,7 @@ |
||
| 159 | 159 | protected function globRecursive($dir, $pattern, $flags = 0) |
| 160 | 160 | { |
| 161 | 161 | $files = glob($dir.'/'.$pattern, $flags); |
| 162 | - foreach (glob($dir.'/*', (GLOB_ONLYDIR|GLOB_NOSORT)) as $dir) { |
|
| 162 | + foreach (glob($dir.'/*', (GLOB_ONLYDIR | GLOB_NOSORT)) as $dir) { |
|
| 163 | 163 | $files = array_merge($files, $this->globRecursive($dir, $pattern, $flags)); |
| 164 | 164 | } |
| 165 | 165 | return $files; |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | protected function isRelativeUri($uri) |
| 108 | 108 | { |
| 109 | 109 | if ($uri && !parse_url($uri, PHP_URL_SCHEME)) { |
| 110 | - if (!in_array($uri[0], [ '/', '#', '?' ])) { |
|
| 110 | + if (!in_array($uri[0], ['/', '#', '?'])) { |
|
| 111 | 111 | return true; |
| 112 | 112 | } |
| 113 | 113 | } |