mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 22:32:40 +08:00
Merge pull request #13304 from rugabarbo/console-request-resolve-optimization
Small optimization of yii\console\Request::resolve()
This commit is contained in:
@ -59,13 +59,11 @@ class Request extends \yii\base\Request
|
|||||||
$rawParams = $this->getParams();
|
$rawParams = $this->getParams();
|
||||||
$endOfOptionsFound = false;
|
$endOfOptionsFound = false;
|
||||||
if (isset($rawParams[0])) {
|
if (isset($rawParams[0])) {
|
||||||
$route = $rawParams[0];
|
$route = array_shift($rawParams);
|
||||||
array_shift($rawParams);
|
|
||||||
|
|
||||||
if ($route === '--') {
|
if ($route === '--') {
|
||||||
$endOfOptionsFound = true;
|
$endOfOptionsFound = true;
|
||||||
$route = $rawParams[0];
|
$route = array_shift($rawParams);
|
||||||
array_shift($rawParams);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$route = '';
|
$route = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user