@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | /** |
| 170 | 170 | * The time admission will commence. |
| 171 | 171 | * |
| 172 | - * @param DateTime $doorTime |
|
| 172 | + * @param DateTimeValue $doorTime |
|
| 173 | 173 | * @return static |
| 174 | 174 | */ |
| 175 | 175 | public function setDoorTime(DateTimeValue $doorTime) |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | /** |
| 192 | 192 | * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. |
| 193 | 193 | * |
| 194 | - * @param Duration $duration |
|
| 194 | + * @param DurationValue $duration |
|
| 195 | 195 | * @return static |
| 196 | 196 | */ |
| 197 | 197 | public function setDuration(DurationValue $duration) |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | /** |
| 214 | 214 | * The end date and time of the item (in ISO 8601 date format). |
| 215 | 215 | * |
| 216 | - * @param Date|DateTime $endDate |
|
| 216 | + * @param DateTimeValue $endDate |
|
| 217 | 217 | * @return static |
| 218 | 218 | */ |
| 219 | 219 | public function setEndDate(DateTimeValue $endDate) |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | * Please use one of the language codes from the IETF BCP 47 standard. See also availableLanguage. |
| 262 | 262 | * Supersedes language. |
| 263 | 263 | * |
| 264 | - * @param Language|Text $inLanguage |
|
| 264 | + * @param LanguageValue $inLanguage |
|
| 265 | 265 | * @return static |
| 266 | 266 | */ |
| 267 | 267 | public function setInLanguage(LanguageValue $inLanguage) |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | |
| 217 | 217 | return [ |
| 218 | 218 | 'module' => $this->module->id, |
| 219 | - 'route' => $this->module->id . '/' . $request['route'], |
|
| 219 | + 'route' => $this->module->id.'/'.$request['route'], |
|
| 220 | 220 | 'params' => $request['originalArgs'], |
| 221 | 221 | ]; |
| 222 | 222 | } |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | throw new NotFoundHttpException(sprintf("Unable to create controller '%s' for module '%s'.", $requestRoute['route'], $this->module->id)); |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | - Yii::debug('LUYA module run module "'.$this->module->id.'" route ' . $requestRoute['route'], __METHOD__); |
|
| 240 | + Yii::debug('LUYA module run module "'.$this->module->id.'" route '.$requestRoute['route'], __METHOD__); |
|
| 241 | 241 | |
| 242 | 242 | $this->controller = $controller[0]; |
| 243 | 243 | $originalController = Yii::$app->controller; |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | * |
| 249 | 249 | * @see https://github.com/luyadev/luya/issues/1730 |
| 250 | 250 | */ |
| 251 | - $this->controller->on(Controller::EVENT_BEFORE_ACTION, function ($event) { |
|
| 251 | + $this->controller->on(Controller::EVENT_BEFORE_ACTION, function($event) { |
|
| 252 | 252 | Yii::$app->controller = $this->controller; |
| 253 | 253 | }); |
| 254 | 254 | /** |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | * |
| 257 | 257 | * @see https://github.com/luyadev/luya/issues/1768 |
| 258 | 258 | */ |
| 259 | - $this->controller->on(Controller::EVENT_AFTER_ACTION, function ($event) use ($originalController) { |
|
| 259 | + $this->controller->on(Controller::EVENT_AFTER_ACTION, function($event) use ($originalController) { |
|
| 260 | 260 | Yii::$app->controller = $originalController; |
| 261 | 261 | }); |
| 262 | 262 | |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | /** |
| 50 | 50 | * Getter method for the e-mail. |
| 51 | 51 | * |
| 52 | - * @return string|boolean Returns the e-mail from the setter method, if mail is not valid false is returned. |
|
| 52 | + * @return string|false Returns the e-mail from the setter method, if mail is not valid false is returned. |
|
| 53 | 53 | */ |
| 54 | 54 | public function getEmail() |
| 55 | 55 | { |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | */ |
| 62 | 62 | public function getHref() |
| 63 | 63 | { |
| 64 | - return empty($this->getEmail()) ? null : 'mailto:' . $this->getEmail(); |
|
| 64 | + return empty($this->getEmail()) ? null : 'mailto:'.$this->getEmail(); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use luya\theme\ThemeConfig; |
| 8 | 8 | use Yii; |
| 9 | 9 | use yii\helpers\Console; |
| 10 | -use yii\helpers\Inflector; |
|
| 11 | 10 | |
| 12 | 11 | /** |
| 13 | 12 | * Command to create a new LUYA theme. |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | $availableModules = implode(', ', array_column(Yii::$app->getFrontendModules(), 'id')); |
| 49 | 49 | $themeLocation = $this->prompt("Enter the theme location where to generate (as path alias e.g. app, $availableModules):", ['default' => 'app']); |
| 50 | - $themeLocation = '@' . ltrim($themeLocation, '@'); |
|
| 50 | + $themeLocation = '@'.ltrim($themeLocation, '@'); |
|
| 51 | 51 | |
| 52 | 52 | preg_match("#^@[A-z]+#", $themeLocation, $newThemeLocation); |
| 53 | 53 | |
@@ -59,15 +59,15 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - $basePath = $themeLocation . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . $themeName; |
|
| 62 | + $basePath = $themeLocation.DIRECTORY_SEPARATOR.'themes'.DIRECTORY_SEPARATOR.$themeName; |
|
| 63 | 63 | $themeFolder = Yii::getAlias($basePath); |
| 64 | 64 | |
| 65 | 65 | if (file_exists($themeFolder)) { |
| 66 | - return $this->outputError("The folder " . $themeFolder . " exists already."); |
|
| 66 | + return $this->outputError("The folder ".$themeFolder." exists already."); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - $this->outputInfo("Theme path alias: " . $basePath); |
|
| 70 | - $this->outputInfo("Theme real path: " . $themeFolder); |
|
| 69 | + $this->outputInfo("Theme path alias: ".$basePath); |
|
| 70 | + $this->outputInfo("Theme real path: ".$themeFolder); |
|
| 71 | 71 | if (!$this->confirm("Do you want continue?")) { |
| 72 | 72 | return $this->outputError('Abort by user.'); |
| 73 | 73 | } |
@@ -81,11 +81,11 @@ discard block |
||
| 81 | 81 | ]; |
| 82 | 82 | |
| 83 | 83 | foreach ($folders as $folder) { |
| 84 | - FileHelper::createDirectory($themeFolder . DIRECTORY_SEPARATOR . $folder); |
|
| 84 | + FileHelper::createDirectory($themeFolder.DIRECTORY_SEPARATOR.$folder); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | $contents = [ |
| 88 | - $themeFolder. DIRECTORY_SEPARATOR . 'theme.json' => $this->renderJson($basePath, $themeName), |
|
| 88 | + $themeFolder.DIRECTORY_SEPARATOR.'theme.json' => $this->renderJson($basePath, $themeName), |
|
| 89 | 89 | ]; |
| 90 | 90 | |
| 91 | 91 | foreach ($contents as $fileName => $content) { |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * |
| 68 | 68 | * @param string $message The message you want to send to the error api server. |
| 69 | 69 | * @param string $file The you are currently send the message (use __FILE__) |
| 70 | - * @param string $line The line you want to submit (use __LINE__) |
|
| 70 | + * @param integer $line The line you want to submit (use __LINE__) |
|
| 71 | 71 | * @return bool|null |
| 72 | 72 | */ |
| 73 | 73 | public function transferMessage($message, $file = __FILE__, $line = __LINE__) |
@@ -105,6 +105,7 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | /** |
| 107 | 107 | * @inheritdoc |
| 108 | + * @param \Exception $exception |
|
| 108 | 109 | */ |
| 109 | 110 | public function renderException($exception) |
| 110 | 111 | { |
@@ -176,9 +176,9 @@ discard block |
||
| 176 | 176 | $_file = $exception->getFile(); |
| 177 | 177 | $_line = $exception->getLine(); |
| 178 | 178 | } elseif (is_string($exception)) { |
| 179 | - $_message = 'exception string: ' . $exception; |
|
| 179 | + $_message = 'exception string: '.$exception; |
|
| 180 | 180 | } elseif (is_array($exception)) { |
| 181 | - $_message = isset($exception['message']) ? $exception['message'] : 'exception array dump: ' . print_r($exception, true); |
|
| 181 | + $_message = isset($exception['message']) ? $exception['message'] : 'exception array dump: '.print_r($exception, true); |
|
| 182 | 182 | $_file = isset($exception['file']) ? $exception['file'] : __FILE__; |
| 183 | 183 | $_line = isset($exception['line']) ? $exception['line'] : __LINE__; |
| 184 | 184 | } |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | |
| 250 | 250 | if (!empty($file)) { |
| 251 | 251 | try { |
| 252 | - $lineInArray = $line -1; |
|
| 252 | + $lineInArray = $line - 1; |
|
| 253 | 253 | // load file from path |
| 254 | 254 | $fileInfo = file($file, FILE_IGNORE_NEW_LINES); |
| 255 | 255 | // load file if false from real path |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | 'class' => isset($item['class']) ? $item['class'] : null, |
| 290 | 290 | // currently arguments wont be transmited due to large amount of informations based on base object |
| 291 | 291 | //'args' => isset($item['args']) ? ArrayHelper::coverSensitiveValues($item['args'], $this->sensitiveKeys) : [], |
| 292 | - ], function ($value) { |
|
| 292 | + ], function($value) { |
|
| 293 | 293 | return !empty($value); |
| 294 | 294 | }); |
| 295 | 295 | } |
@@ -53,18 +53,18 @@ discard block |
||
| 53 | 53 | if (strpos($basePath, '@') === 0) { |
| 54 | 54 | $dir = Yii::getAlias($basePath); |
| 55 | 55 | } elseif (strpos($basePath, '/') !== 0) { |
| 56 | - $dir = $basePath = Yii::$app->basePath . DIRECTORY_SEPARATOR . $basePath; |
|
| 56 | + $dir = $basePath = Yii::$app->basePath.DIRECTORY_SEPARATOR.$basePath; |
|
| 57 | 57 | } else { |
| 58 | 58 | $dir = $basePath; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | if (!is_dir($dir) || !is_readable($dir)) { |
| 62 | - throw new Exception('Theme directory not exists or readable: ' . $dir); |
|
| 62 | + throw new Exception('Theme directory not exists or readable: '.$dir); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - $themeFile = $dir . '/theme.json'; |
|
| 65 | + $themeFile = $dir.'/theme.json'; |
|
| 66 | 66 | if (!file_exists($themeFile)) { |
| 67 | - throw new InvalidConfigException('Theme config file missing at: ' . $themeFile); |
|
| 67 | + throw new InvalidConfigException('Theme config file missing at: '.$themeFile); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | $config = Json::decode(file_get_contents($themeFile)) ?: []; |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | |
| 160 | 160 | if (file_exists(Yii::getAlias('@app/themes'))) { |
| 161 | 161 | foreach (glob(Yii::getAlias('@app/themes/*')) as $dirPath) { |
| 162 | - $themeDefinitions[] = "@app/themes/" . basename($dirPath); |
|
| 162 | + $themeDefinitions[] = "@app/themes/".basename($dirPath); |
|
| 163 | 163 | } |
| 164 | 164 | } |
| 165 | 165 | |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | |
| 206 | 206 | $this->_themes[$basePath] = $themeConfig; |
| 207 | 207 | |
| 208 | - Yii::setAlias('@' . basename($basePath) . 'Theme', $basePath); |
|
| 208 | + Yii::setAlias('@'.basename($basePath).'Theme', $basePath); |
|
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | /** |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | $pos = strpos($viewPath, '/'); |
| 77 | - $rootPath = $pos === false ? $viewPath : (substr($viewPath, 0, $pos) . '/views'); |
|
| 77 | + $rootPath = $pos === false ? $viewPath : (substr($viewPath, 0, $pos).'/views'); |
|
| 78 | 78 | $this->pathMap[$rootPath] = $pathMap; |
| 79 | 79 | |
| 80 | 80 | $this->pathMap['@app/views'] = $pathMap; |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | */ |
| 110 | 110 | public function getLayoutPath() |
| 111 | 111 | { |
| 112 | - return $this->viewPath . '/' . self::LAYOUTS_PATH; |
|
| 112 | + return $this->viewPath.'/'.self::LAYOUTS_PATH; |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | /** |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | { |
| 124 | 124 | if (Yii::$app->request->isPost) { |
| 125 | 125 | if ($this->getElapsedProcessTime() < $this->delay) { |
| 126 | - throw new WhitelistedException("Robots Filter has detected an invalid Request: " . VarDumper::export(ArrayHelper::coverSensitiveValues(Yii::$app->request->post()))); |
|
| 126 | + throw new WhitelistedException("Robots Filter has detected an invalid Request: ".VarDumper::export(ArrayHelper::coverSensitiveValues(Yii::$app->request->post()))); |
|
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | |
@@ -140,6 +140,6 @@ |
||
| 140 | 140 | */ |
| 141 | 141 | public function getViewPath() |
| 142 | 142 | { |
| 143 | - return $this->getBasePath() . '/views'; |
|
| 143 | + return $this->getBasePath().'/views'; |
|
| 144 | 144 | } |
| 145 | 145 | } |