diff --git a/lib/RexResultsRenderer.php b/lib/RexResultsRenderer.php index 127325101..f774b98ac 100644 --- a/lib/RexResultsRenderer.php +++ b/lib/RexResultsRenderer.php @@ -47,11 +47,14 @@ public static function getResultEmoji(int $level): string case 9: $emoji = '🏆'; break; + case 10: + $emoji = '👑'; + break; } return $emoji; } - public static function getLevel9Jseffect(): string + public static function getLevel10Jseffect(): string { $nonce = method_exists(rex_response::class, 'getNonce') ? ' nonce="'.rex_response::getNonce().'"' : ''; return diff --git a/lib/RexStanSettings.php b/lib/RexStanSettings.php index 17bd36379..c392307da 100644 --- a/lib/RexStanSettings.php +++ b/lib/RexStanSettings.php @@ -131,9 +131,9 @@ public static function createForm() self::fixAbsoluteToRelativePaths(); $form = rex_config_form::factory('rexstan'); - $field = $form->addInputField('number', 'level', null, ['class' => 'form-control', 'min' => 0, 'max' => 9]); + $field = $form->addInputField('number', 'level', null, ['class' => 'form-control', 'min' => 0, 'max' => 10]); $field->setLabel('Level'); - $field->setNotice('von 0 einfach, bis 9 sehr strikt - PHPStan Rule Levels'); + $field->setNotice('von 0 einfach, bis 10 sehr strikt - PHPStan Rule Levels'); $field = $form->addCheckboxField('baseline'); $field->addOption('Baseline verwenden', self::BASELINE_ENABLED); diff --git a/lib/command.php b/lib/command.php index 0b5efafab..64f679b83 100644 --- a/lib/command.php +++ b/lib/command.php @@ -46,7 +46,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $arguments = ''; if ($input->getOption('level') !== null) { $level = $input->getOption('level'); - if (!preg_match('/^[0-9]$/', $level)) { + if (!preg_match('/^1?[0-9]$/', $level)) { throw new Exception('Invalid level: '. $level); } $arguments .= ' --level='.$level; diff --git a/pages/analysis.php b/pages/analysis.php index 68a613157..e09bdbf8d 100644 --- a/pages/analysis.php +++ b/pages/analysis.php @@ -86,8 +86,8 @@ echo ''.$emoji .''; echo rex_view::success('Gratulation, es wurden keine Fehler in Level '. $level .' gefunden.'); - if ($level === 9) { - echo RexResultsRenderer::getLevel9Jseffect(); + if ($level === 10) { + echo RexResultsRenderer::getLevel10Jseffect(); } else { echo '
';