diff options
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/Log/Manage.php | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/core/Command/Log/Manage.php b/core/Command/Log/Manage.php index 34ec5ea54a8..63a8efde370 100644 --- a/core/Command/Log/Manage.php +++ b/core/Command/Log/Manage.php @@ -141,18 +141,18 @@ class Manage extends Command implements CompletionAwareInterface { protected function convertLevelString($level) { $level = strtolower($level); switch ($level) { - case 'debug': - return 0; - case 'info': - return 1; - case 'warning': - case 'warn': - return 2; - case 'error': - case 'err': - return 3; - case 'fatal': - return 4; + case 'debug': + return 0; + case 'info': + return 1; + case 'warning': + case 'warn': + return 2; + case 'error': + case 'err': + return 3; + case 'fatal': + return 4; } throw new \InvalidArgumentException('Invalid log level string'); } @@ -164,16 +164,16 @@ class Manage extends Command implements CompletionAwareInterface { */ protected function convertLevelNumber($levelNum) { switch ($levelNum) { - case 0: - return 'Debug'; - case 1: - return 'Info'; - case 2: - return 'Warning'; - case 3: - return 'Error'; - case 4: - return 'Fatal'; + case 0: + return 'Debug'; + case 1: + return 'Info'; + case 2: + return 'Warning'; + case 3: + return 'Error'; + case 4: + return 'Fatal'; } throw new \InvalidArgumentException('Invalid log level number'); } @@ -189,11 +189,7 @@ class Manage extends Command implements CompletionAwareInterface { } elseif ($optionName === 'level') { return ['debug', 'info', 'warning', 'error', 'fatal']; } elseif ($optionName === 'timezone') { - $identifier = \DateTimeZone::listIdentifiers(); - if ($identifier === false) { - return []; - } - return $identifier; + return \DateTimeZone::listIdentifiers(); } return []; } |