@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | /** |
| 101 | 101 | * Run the application based on the Sapi Name. |
| 102 | 102 | * |
| 103 | - * @return luya\web\Application|luya\cli\Application Application objected based on the sapi name. |
|
| 103 | + * @return null|integer Application objected based on the sapi name. |
|
| 104 | 104 | */ |
| 105 | 105 | public function run() |
| 106 | 106 | { |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | /** |
| 134 | 134 | * Run Web-Application based on the provided config file. |
| 135 | 135 | * |
| 136 | - * @return string|void Returns the Yii Application run() method if mock is disabled. Otherwise returns void |
|
| 136 | + * @return integer|null Returns the Yii Application run() method if mock is disabled. Otherwise returns void |
|
| 137 | 137 | */ |
| 138 | 138 | public function applicationWeb() |
| 139 | 139 | { |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | public function setConfigArray(array $config) |
| 93 | 93 | { |
| 94 | - $this->_configArray = $config; |
|
| 94 | + $this->_configArray = $config; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -103,24 +103,24 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | public function getConfigArray() |
| 105 | 105 | { |
| 106 | - if ($this->_configArray === null) { |
|
| 107 | - if (!file_exists($this->configFile)) { |
|
| 108 | - throw new Exception("Unable to load the config file '".$this->configFile."'."); |
|
| 109 | - } |
|
| 106 | + if ($this->_configArray === null) { |
|
| 107 | + if (!file_exists($this->configFile)) { |
|
| 108 | + throw new Exception("Unable to load the config file '".$this->configFile."'."); |
|
| 109 | + } |
|
| 110 | 110 | |
| 111 | - $config = require $this->configFile; |
|
| 111 | + $config = require $this->configFile; |
|
| 112 | 112 | |
| 113 | - if (!is_array($config)) { |
|
| 114 | - throw new Exception("config file '".$this->configFile."' found but no array returning."); |
|
| 115 | - } |
|
| 113 | + if (!is_array($config)) { |
|
| 114 | + throw new Exception("config file '".$this->configFile."' found but no array returning."); |
|
| 115 | + } |
|
| 116 | 116 | |
| 117 | - // adding default configuration timezone if not set |
|
| 118 | - if (!array_key_exists('timezone', $config)) { |
|
| 119 | - $config['timezone'] = 'Europe/Berlin'; |
|
| 120 | - } |
|
| 117 | + // adding default configuration timezone if not set |
|
| 118 | + if (!array_key_exists('timezone', $config)) { |
|
| 119 | + $config['timezone'] = 'Europe/Berlin'; |
|
| 120 | + } |
|
| 121 | 121 | |
| 122 | - $this->_configArray = $config; |
|
| 123 | - } |
|
| 122 | + $this->_configArray = $config; |
|
| 123 | + } |
|
| 124 | 124 | |
| 125 | 125 | return $this->_configArray; |
| 126 | 126 | } |
@@ -56,6 +56,11 @@ discard block |
||
| 56 | 56 | ]; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | + /** |
|
| 60 | + * @param string $type |
|
| 61 | + * @param string $varName |
|
| 62 | + * @param string $func |
|
| 63 | + */ |
|
| 59 | 64 | private function getExtraVarDef($type, $varName, $func) |
| 60 | 65 | { |
| 61 | 66 | $info = [ |
@@ -72,6 +77,9 @@ discard block |
||
| 72 | 77 | return false; |
| 73 | 78 | } |
| 74 | 79 | |
| 80 | + /** |
|
| 81 | + * @param string $type |
|
| 82 | + */ |
|
| 75 | 83 | private function getVariableTypeOption($type) |
| 76 | 84 | { |
| 77 | 85 | $types = $this->getVariableTypesOptions(); |
@@ -79,6 +87,9 @@ discard block |
||
| 79 | 87 | return $types[$type]; |
| 80 | 88 | } |
| 81 | 89 | |
| 90 | + /** |
|
| 91 | + * @param string $type |
|
| 92 | + */ |
|
| 82 | 93 | private function hasVariableTypeOption($type) |
| 83 | 94 | { |
| 84 | 95 | return array_key_exists($type, $this->getVariableTypesOptions()); |
@@ -292,6 +303,9 @@ discard block |
||
| 292 | 303 | return $this->outputError("Error while creating file '$file'"); |
| 293 | 304 | } |
| 294 | 305 | |
| 306 | + /** |
|
| 307 | + * @param string $prefix |
|
| 308 | + */ |
|
| 295 | 309 | private function placeholderCreator($prefix) |
| 296 | 310 | { |
| 297 | 311 | $this->output(PHP_EOL.'-> Create new '.$prefix, Console::FG_YELLOW); |
@@ -310,8 +324,8 @@ discard block |
||
| 310 | 324 | |
| 311 | 325 | /** |
| 312 | 326 | * |
| 313 | - * @param unknown $prefix |
|
| 314 | - * @param string $type 'var', 'cfg' |
|
| 327 | + * @param string $prefix |
|
| 328 | + * @param string $typeCast |
|
| 315 | 329 | * @return multitype:string Ambigous <string, array> |
| 316 | 330 | */ |
| 317 | 331 | private function varCreator($prefix, $typeCast) |
@@ -42,6 +42,11 @@ |
||
| 42 | 42 | } |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | + /** |
|
| 46 | + * @param string|boolean $module |
|
| 47 | + * |
|
| 48 | + * @return string |
|
| 49 | + */ |
|
| 45 | 50 | private function getModuleMigrationDirectorie($module) |
| 46 | 51 | { |
| 47 | 52 | if (!array_key_exists($module, $this->moduleMigrationDirectories)) { |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | * |
| 38 | 38 | * @param string $route |
| 39 | 39 | * @param array $params |
| 40 | - * @param boolean $sheme Whether to return static url or not |
|
| 40 | + * @param boolean $scheme Whether to return static url or not |
|
| 41 | 41 | * @todo we have to remove this method as it provides no additinal functions to the yii\helpers\url to method |
| 42 | 42 | */ |
| 43 | 43 | public static function toManager($route, array $params = [], $scheme = false) |
@@ -71,7 +71,6 @@ |
||
| 71 | 71 | * $this->addLog('block', 'new block <ID> have been found and added to database'); |
| 72 | 72 | * ``` |
| 73 | 73 | * |
| 74 | - * @param string $section |
|
| 75 | 74 | * @param string $value |
| 76 | 75 | * @todo trigger deprecated section call |
| 77 | 76 | */ |
@@ -73,6 +73,7 @@ |
||
| 73 | 73 | * @param string $key The identifier key |
| 74 | 74 | * @param mixed $value The value to store in the cache component. |
| 75 | 75 | * @param \yii\caching\Dependency $dependency Dependency of the cached item. If the dependency changes, the corresponding value in the cache will be invalidated when it is fetched via get(). This parameter is ignored if $serializer is false. |
| 76 | + * @param integer $cacheExpiration |
|
| 76 | 77 | * @return void |
| 77 | 78 | */ |
| 78 | 79 | public function setHasCache($key, $value, $dependency = null, $cacheExpiration = null) |
@@ -37,6 +37,7 @@ discard block |
||
| 37 | 37 | * |
| 38 | 38 | * {@inheritDoc} |
| 39 | 39 | * @see \yii\web\UrlManager::parseRequest() |
| 40 | + * @param Request $request |
|
| 40 | 41 | */ |
| 41 | 42 | public function parseRequest($request) |
| 42 | 43 | { |
@@ -141,7 +142,7 @@ discard block |
||
| 141 | 142 | * Remove the base url from a route |
| 142 | 143 | * |
| 143 | 144 | * @param string $route The route where the baseUrl should be removed from. |
| 144 | - * @return mixed |
|
| 145 | + * @return string |
|
| 145 | 146 | */ |
| 146 | 147 | public function removeBaseUrl($route) |
| 147 | 148 | { |
@@ -189,7 +190,7 @@ discard block |
||
| 189 | 190 | * Yii2 createUrl base implementation extends the prepand of the comosition |
| 190 | 191 | * |
| 191 | 192 | * @param string|array $params An array with params or not (e.g. `['module/controller/action', 'param1' => 'value1']`) |
| 192 | - * @param null|object $composition Composition instance to change the route behavior |
|
| 193 | + * @param Composition $composition Composition instance to change the route behavior |
|
| 193 | 194 | * @return string |
| 194 | 195 | */ |
| 195 | 196 | public function internalCreateUrl($params, $composition = null) |
@@ -241,7 +242,7 @@ discard block |
||
| 241 | 242 | * |
| 242 | 243 | * The module to test must be an instance of `luya\base\Module`. |
| 243 | 244 | * |
| 244 | - * @param unknown $route |
|
| 245 | + * @param string $route |
|
| 245 | 246 | * @return boolean|string |
| 246 | 247 | */ |
| 247 | 248 | private function findModuleInRoute($route) |
@@ -255,6 +256,9 @@ discard block |
||
| 255 | 256 | return false; |
| 256 | 257 | } |
| 257 | 258 | |
| 259 | + /** |
|
| 260 | + * @param string $url |
|
| 261 | + */ |
|
| 258 | 262 | private function urlReplaceModule($url, $navItemId, Composition $composition) |
| 259 | 263 | { |
| 260 | 264 | $route = $composition->removeFrom($this->removeBaseUrl($url)); |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | * @param string $from |
| 44 | 44 | * @param string $to |
| 45 | 45 | * @param string $subject |
| 46 | - * @return mixed |
|
| 46 | + * @return string |
|
| 47 | 47 | * @since 1.0.0-rc1 |
| 48 | 48 | */ |
| 49 | 49 | public static function replaceFirst($from, $to, $subject) |
@@ -25,26 +25,26 @@ |
||
| 25 | 25 | |
| 26 | 26 | public function coreCommands() |
| 27 | 27 | { |
| 28 | - return [ |
|
| 29 | - // yii default commands |
|
| 30 | - 'asset' => 'yii\console\controllers\AssetController', |
|
| 31 | - 'cache' => 'yii\console\controllers\CacheController', |
|
| 32 | - 'fixture' => 'yii\console\controllers\FixtureController', |
|
| 33 | - 'help' => 'yii\console\controllers\HelpController', |
|
| 34 | - 'message' => 'yii\console\controllers\MessageController', |
|
| 35 | - 'serve' => 'yii\console\controllers\ServeController', |
|
| 36 | - // luya default commands |
|
| 37 | - 'migrate' => 'luya\console\commands\MigrateController', |
|
| 38 | - 'crud' => 'luya\console\commands\CrudController', |
|
| 39 | - 'module' => 'luya\console\commands\ModuleController', |
|
| 40 | - 'command' => 'luya\console\commands\CommandController', |
|
| 41 | - 'import' => 'luya\console\commands\ImportController', |
|
| 42 | - 'setup' => 'luya\console\commands\SetupController', |
|
| 43 | - 'health' => 'luya\console\commands\HealthController', |
|
| 44 | - 'block' => 'luya\console\commands\BlockController', |
|
| 45 | - 'storage' => 'luya\console\commands\StorageController', |
|
| 46 | - 'aw' => 'luya\console\commands\ActiveWindowController', |
|
| 47 | - ]; |
|
| 28 | + return [ |
|
| 29 | + // yii default commands |
|
| 30 | + 'asset' => 'yii\console\controllers\AssetController', |
|
| 31 | + 'cache' => 'yii\console\controllers\CacheController', |
|
| 32 | + 'fixture' => 'yii\console\controllers\FixtureController', |
|
| 33 | + 'help' => 'yii\console\controllers\HelpController', |
|
| 34 | + 'message' => 'yii\console\controllers\MessageController', |
|
| 35 | + 'serve' => 'yii\console\controllers\ServeController', |
|
| 36 | + // luya default commands |
|
| 37 | + 'migrate' => 'luya\console\commands\MigrateController', |
|
| 38 | + 'crud' => 'luya\console\commands\CrudController', |
|
| 39 | + 'module' => 'luya\console\commands\ModuleController', |
|
| 40 | + 'command' => 'luya\console\commands\CommandController', |
|
| 41 | + 'import' => 'luya\console\commands\ImportController', |
|
| 42 | + 'setup' => 'luya\console\commands\SetupController', |
|
| 43 | + 'health' => 'luya\console\commands\HealthController', |
|
| 44 | + 'block' => 'luya\console\commands\BlockController', |
|
| 45 | + 'storage' => 'luya\console\commands\StorageController', |
|
| 46 | + 'aw' => 'luya\console\commands\ActiveWindowController', |
|
| 47 | + ]; |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |