Skip to content

refactor: update PHPStan baseline and fix Rector #9498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion system/HTTP/UserAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ protected function compileData()
$this->setPlatform();

foreach (['setRobot', 'setBrowser', 'setMobile'] as $function) {
if ($this->{$function}() === true) {
if ($this->{$function}()) {
break;
}
}
Expand Down
2 changes: 2 additions & 0 deletions utils/phpstan-baseline/loader.neon
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# total 3759 errors
includes:
- argument.type.neon
- assign.propertyType.neon
Expand Down Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion utils/phpstan-baseline/method.alreadyNarrowedType.neon
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 8 additions & 0 deletions utils/phpstan-baseline/offsetAccess.notFound.neon
Original file line number Diff line number Diff line change
@@ -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
Loading