Skip to content

Commit c377646

Browse files
authored
refactor: update PHPStan baseline and fix Rector (#9498)
* refactor: update PHPStan baseline * fix Rector
1 parent c7e4798 commit c377646

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

system/HTTP/UserAgent.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ protected function compileData()
278278
$this->setPlatform();
279279

280280
foreach (['setRobot', 'setBrowser', 'setMobile'] as $function) {
281-
if ($this->{$function}() === true) {
281+
if ($this->{$function}()) {
282282
break;
283283
}
284284
}

utils/phpstan-baseline/loader.neon

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# total 3759 errors
12
includes:
23
- argument.type.neon
34
- assign.propertyType.neon
@@ -25,6 +26,7 @@ includes:
2526
- notIdentical.alwaysTrue.neon
2627
- nullCoalesce.property.neon
2728
- nullCoalesce.variable.neon
29+
- offsetAccess.notFound.neon
2830
- property.defaultValue.neon
2931
- property.nonObject.neon
3032
- property.notFound.neon

utils/phpstan-baseline/method.alreadyNarrowedType.neon

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
# total 22 errors
1+
# total 24 errors
22

33
parameters:
44
ignoreErrors:
5+
-
6+
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with bool will always evaluate to true\.$#'
7+
count: 1
8+
path: ../../admin/starter/tests/unit/HealthTest.php
9+
10+
-
11+
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with bool will always evaluate to true\.$#'
12+
count: 1
13+
path: ../../tests/system/Autoloader/AutoloaderTest.php
14+
515
-
616
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsBool\(\) with bool will always evaluate to true\.$#'
717
count: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# total 2 errors
2+
3+
parameters:
4+
ignoreErrors:
5+
-
6+
message: '#^Offset ''_ci_old_input'' does not exist on array\{\}\.$#'
7+
count: 2
8+
path: ../../tests/system/HTTP/RedirectResponseTest.php

0 commit comments

Comments
 (0)