mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 06:11:35 +08:00
Scrutinizer fixes (#18685)
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/filters/AccessRule.php?selectedLabels%5B0%5D=2&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0 * https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/helpers/BaseFileHelper.php?selectedLabels%5B0%5D=2&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0 * https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/base/Application.php?selectedLabels%5B0%5D=7&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0 * https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/base/Module.php?selectedLabels%5B0%5D=7&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0 * https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/web/MultipartFormDataParser.php?selectedLabels%5B0%5D=7&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0 * https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/web/Session.php?selectedLabels%5B0%5D=7&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0 * https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/base/Controller.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0 * https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/MigrateController.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0 * Added vardocs, and small refactor * https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/db/conditions/InConditionBuilder.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0 * https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/db/Connection.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0 * https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/db/mssql/QueryBuilder.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0 * https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/log/Logger.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0 * https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/BaseMigrateController.php?selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0 * Adding space between type * https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/CacheController.php?selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0 * https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/FixtureController.php?selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0 * https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/MigrateController.php?selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0 * Update framework/console/controllers/CacheController.php Co-authored-by: Alexander Makarov <sam@rmcreative.ru> * Update framework/console/controllers/CacheController.php Co-authored-by: Alexander Makarov <sam@rmcreative.ru> * Update framework/console/controllers/FixtureController.php Co-authored-by: Alexander Makarov <sam@rmcreative.ru> * Update framework/console/controllers/FixtureController.php Co-authored-by: Alexander Makarov <sam@rmcreative.ru> * Update framework/console/controllers/FixtureController.php Co-authored-by: Alexander Makarov <sam@rmcreative.ru> * Update framework/console/controllers/FixtureController.php Co-authored-by: Alexander Makarov <sam@rmcreative.ru> * Update framework/console/controllers/FixtureController.php Co-authored-by: Alexander Makarov <sam@rmcreative.ru> * Update framework/console/controllers/FixtureController.php Co-authored-by: Alexander Makarov <sam@rmcreative.ru> Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
This commit is contained in:
@ -587,9 +587,7 @@ abstract class BaseMigrateController extends Controller
|
||||
*/
|
||||
public function actionNew($limit = 10)
|
||||
{
|
||||
if ($limit === 'all') {
|
||||
$limit = null;
|
||||
} else {
|
||||
if ($limit !== 'all') {
|
||||
$limit = (int) $limit;
|
||||
if ($limit < 1) {
|
||||
throw new Exception('The limit must be greater than 0.');
|
||||
@ -602,7 +600,7 @@ abstract class BaseMigrateController extends Controller
|
||||
$this->stdout("No new migrations found. Your system is up-to-date.\n", Console::FG_GREEN);
|
||||
} else {
|
||||
$n = count($migrations);
|
||||
if ($limit && $n > $limit) {
|
||||
if ($limit !== 'all' && $n > $limit) {
|
||||
$migrations = array_slice($migrations, 0, $limit);
|
||||
$this->stdout("Showing $limit out of $n new " . ($n === 1 ? 'migration' : 'migrations') . ":\n", Console::FG_YELLOW);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user