@@ -78,7 +78,7 @@ |
||
| 78 | 78 | 'now' => [ |
| 79 | 79 | 'longPrefix' => 'now', |
| 80 | 80 | 'description' => 'The "relative" time this script should run at. '. |
| 81 | - 'If nothing is provided, default "now" is used.', |
|
| 81 | + 'If nothing is provided, default "now" is used.', |
|
| 82 | 82 | 'defaultValue' => 'now' |
| 83 | 83 | ] |
| 84 | 84 | ]; |
@@ -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 | } |
@@ -133,7 +133,7 @@ |
||
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | $parts = parse_url($val); |
| 136 | - if (empty($parts['scheme']) && !in_array($val[0], [ '/', '#', '?' ])) { |
|
| 136 | + if (empty($parts['scheme']) && !in_array($val[0], ['/', '#', '?'])) { |
|
| 137 | 137 | $path = isset($parts['path']) ? ltrim($parts['path'], '/') : ''; |
| 138 | 138 | $query = isset($parts['query']) ? $parts['query'] : ''; |
| 139 | 139 | $hash = isset($parts['fragment']) ? $parts['fragment'] : ''; |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | */ |
| 471 | 471 | public function supportedOutputTypes() |
| 472 | 472 | { |
| 473 | - return [ static::PROPERTY_CONTROL, static::PROPERTY_DISPLAY ]; |
|
| 473 | + return [static::PROPERTY_CONTROL, static::PROPERTY_DISPLAY]; |
|
| 474 | 474 | } |
| 475 | 475 | |
| 476 | 476 | /** |
@@ -1139,7 +1139,7 @@ discard block |
||
| 1139 | 1139 | */ |
| 1140 | 1140 | public function inputNameAsCssClass() |
| 1141 | 1141 | { |
| 1142 | - $name = str_replace([ ']', '[' ], [ '', '-' ], $this->propertyIdent()); |
|
| 1142 | + $name = str_replace([']', '['], ['', '-'], $this->propertyIdent()); |
|
| 1143 | 1143 | $name = $this->camelize($name); |
| 1144 | 1144 | |
| 1145 | 1145 | return $name; |
@@ -1178,7 +1178,7 @@ discard block |
||
| 1178 | 1178 | */ |
| 1179 | 1179 | protected function defaultFormFieldCssClasses() |
| 1180 | 1180 | { |
| 1181 | - $classes = [ 'form-field', 'form-field-'.$this->widgetId() ]; |
|
| 1181 | + $classes = ['form-field', 'form-field-'.$this->widgetId()]; |
|
| 1182 | 1182 | |
| 1183 | 1183 | if ($this->prop()) { |
| 1184 | 1184 | $classes[] = 'form-property-'.$this->inputNameAsCssClass(); |
@@ -1250,7 +1250,7 @@ discard block |
||
| 1250 | 1250 | */ |
| 1251 | 1251 | protected function defaultFormGroupCssClasses() |
| 1252 | 1252 | { |
| 1253 | - return [ 'form-group' ]; |
|
| 1253 | + return ['form-group']; |
|
| 1254 | 1254 | } |
| 1255 | 1255 | |
| 1256 | 1256 | /** |
@@ -185,7 +185,7 @@ |
||
| 185 | 185 | public function sidebars() |
| 186 | 186 | { |
| 187 | 187 | $sidebars = $this->sidebars; |
| 188 | - uasort($sidebars, [ $this, 'sortSidebarsByPriority' ]); |
|
| 188 | + uasort($sidebars, [$this, 'sortSidebarsByPriority']); |
|
| 189 | 189 | foreach ($sidebars as $sidebarIdent => $sidebar) { |
| 190 | 190 | if (!$sidebar->active()) { |
| 191 | 191 | continue; |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | $ret = true; |
| 64 | 64 | // Previous static version must be deleted in order to generate a new one. |
| 65 | 65 | if (file_exists($outputDir.'/index.php')) { |
| 66 | - $ret =unlink($outputDir.'/index.php'); |
|
| 66 | + $ret = unlink($outputDir.'/index.php'); |
|
| 67 | 67 | } |
| 68 | 68 | if (file_exists($outputDir.'/index.html')) { |
| 69 | 69 | $ret = unlink($outputDir.'/index.html'); |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | private function globRecursive($dir, $pattern, $flags = 0) |
| 107 | 107 | { |
| 108 | 108 | $files = glob($dir.'/'.$pattern, $flags); |
| 109 | - foreach (glob($dir.'/*', (GLOB_ONLYDIR|GLOB_NOSORT)) as $dir) { |
|
| 109 | + foreach (glob($dir.'/*', (GLOB_ONLYDIR | GLOB_NOSORT)) as $dir) { |
|
| 110 | 110 | $files = array_merge($files, $this->globRecursive($dir, $pattern, $flags)); |
| 111 | 111 | } |
| 112 | 112 | return $files; |