From 6e2f2f1c1e98ecd86aa89c6547beb742d7385d18 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 11 May 2023 13:02:04 +0200 Subject: A few additional PHPStan rules (#5388) A subset of https://github.com/phpstan/phpstan-strict-rules --- app/install.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/install.php') diff --git a/app/install.php b/app/install.php index cb49b8de7..65efe40f1 100644 --- a/app/install.php +++ b/app/install.php @@ -31,7 +31,7 @@ function initTranslate(): void { Minz_Session::_param('language', get_best_language()); } - if (!in_array(Minz_Session::param('language'), $available_languages)) { + if (!in_array(Minz_Session::param('language'), $available_languages, true)) { Minz_Session::_param('language', 'en'); } @@ -265,7 +265,7 @@ function checkStep(): void { /** @return array */ function checkStep0(): array { $languages = Minz_Translate::availableLanguages(); - $language = Minz_Session::param('language') != '' && in_array(Minz_Session::param('language'), $languages); + $language = Minz_Session::param('language') != '' && in_array(Minz_Session::param('language'), $languages, true); $sessionWorking = Minz_Session::param('sessionWorking') === 'ok'; return array( @@ -565,7 +565,7 @@ function printStep2(): void { } function no_auth(string $auth_type): bool { - return !in_array($auth_type, array('form', 'http_auth', 'none')); + return !in_array($auth_type, ['form', 'http_auth', 'none'], true); } function printStep3(): void { -- cgit v1.2.3