diff --git a/system/HTTP/UserAgent.php b/system/HTTP/UserAgent.php index ec4d17438284..5e8eece63659 100644 --- a/system/HTTP/UserAgent.php +++ b/system/HTTP/UserAgent.php @@ -278,7 +278,7 @@ protected function compileData() $this->setPlatform(); foreach (['setRobot', 'setBrowser', 'setMobile'] as $function) { - if ($this->{$function}() === true) { + if ($this->{$function}()) { break; } } diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index a2989fec1d0d..f795aabb7fb5 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,3 +1,4 @@ +# total 3759 errors includes: - argument.type.neon - assign.propertyType.neon @@ -25,6 +26,7 @@ includes: - notIdentical.alwaysTrue.neon - nullCoalesce.property.neon - nullCoalesce.variable.neon + - offsetAccess.notFound.neon - property.defaultValue.neon - property.nonObject.neon - property.notFound.neon diff --git a/utils/phpstan-baseline/method.alreadyNarrowedType.neon b/utils/phpstan-baseline/method.alreadyNarrowedType.neon index ed9ef85490e3..23132319175b 100644 --- a/utils/phpstan-baseline/method.alreadyNarrowedType.neon +++ b/utils/phpstan-baseline/method.alreadyNarrowedType.neon @@ -1,7 +1,17 @@ -# total 22 errors +# total 24 errors parameters: ignoreErrors: + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with bool will always evaluate to true\.$#' + count: 1 + path: ../../admin/starter/tests/unit/HealthTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with bool will always evaluate to true\.$#' + count: 1 + path: ../../tests/system/Autoloader/AutoloaderTest.php + - message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsBool\(\) with bool will always evaluate to true\.$#' count: 1 diff --git a/utils/phpstan-baseline/offsetAccess.notFound.neon b/utils/phpstan-baseline/offsetAccess.notFound.neon new file mode 100644 index 000000000000..ba50b4d14f96 --- /dev/null +++ b/utils/phpstan-baseline/offsetAccess.notFound.neon @@ -0,0 +1,8 @@ +# total 2 errors + +parameters: + ignoreErrors: + - + message: '#^Offset ''_ci_old_input'' does not exist on array\{\}\.$#' + count: 2 + path: ../../tests/system/HTTP/RedirectResponseTest.php