Skip to content

Commit 91deebc

Browse files
committed
Fix stan errors
1 parent c75d6d5 commit 91deebc

4 files changed

Lines changed: 44 additions & 4 deletions

File tree

‎.phive/phars.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="phpstan" version="2.1.55" installed="2.1.55" location="./tools/phpstan" copy="false"/>
4-
<phar name="psalm" version="7.0.0-beta19" installed="7.0.0-beta19" location="./tools/psalm" copy="false"/>
3+
<phar name="phpstan" version="2.2.14" installed="2.2.14" location="./tools/phpstan" copy="false"/>
4+
<phar name="psalm" version="7.0.0-beta22" installed="7.0.0-beta22" location="./tools/psalm" copy="false"/>
55
</phive>

‎phpstan-baseline.neon‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
parameters:
22
ignoreErrors:
3+
-
4+
message: '#^Call to method skipAuthorization\(\) on an unknown class Authorization\\AuthorizationService\.$#'
5+
identifier: class.notFound
6+
count: 1
7+
path: src/Controller/DebugKitController.php
8+
9+
-
10+
message: '#^Class Authorization\\AuthorizationService not found\.$#'
11+
identifier: class.notFound
12+
count: 1
13+
path: src/Controller/DebugKitController.php
14+
15+
-
16+
message: '#^Possibly invalid array key type string\|null\.$#'
17+
identifier: offsetAccess.invalidOffset
18+
count: 2
19+
path: src/DebugInclude.php
20+
21+
-
22+
message: '#^Possibly invalid array key type int\|string\|null\.$#'
23+
identifier: offsetAccess.invalidOffset
24+
count: 2
25+
path: src/DebugTimer.php
26+
327
-
428
message: '#^Parameter \#1 \$request of method DebugKit\\ToolbarService\:\:saveData\(\) expects Cake\\Http\\ServerRequest, Psr\\Http\\Message\\ServerRequestInterface given\.$#'
529
identifier: argument.type
@@ -12,6 +36,12 @@ parameters:
1236
count: 1
1337
path: src/Model/Table/PanelsTable.php
1438

39+
-
40+
message: '#^Cannot call method getRequest\(\) on Cake\\Controller\\Controller\|null\.$#'
41+
identifier: method.nonObject
42+
count: 1
43+
path: src/Panel/RoutesPanel.php
44+
1545
-
1646
message: '#^Call to an undefined method Cake\\ORM\\Locator\\LocatorInterface\:\:genericInstances\(\)\.$#'
1747
identifier: method.notFound

‎psalm-baseline.xml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="7.0.0-beta16@491dd740b8862db7d4fe8c1f6c161055c32ad651">
2+
<files psalm-version="7.0.0-beta22@de27e5724ee5997a1e3baee4d394ca6f4e46eba0">
3+
<file src="src/Cache/Engine/DebugEngine.php">
4+
<MethodSignatureMismatch>
5+
<code><![CDATA[public function setConfig(array|string $key, mixed $value = null, bool $merge = true): static]]></code>
6+
</MethodSignatureMismatch>
7+
</file>
8+
<file src="src/Controller/DebugKitController.php">
9+
<UndefinedClass>
10+
<code><![CDATA[AuthorizationService]]></code>
11+
</UndefinedClass>
12+
</file>
313
<file src="src/Mailer/PreviewResult.php">
414
<ImpureMethodCall>
515
<code><![CDATA[$mailer->render()]]></code>

‎src/Log/Engine/DebugKitLog.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function all(): array
6060
*/
6161
public function count(): int
6262
{
63-
return array_reduce($this->_logs, function (int|float $sum, $v): int {
63+
return array_reduce($this->_logs, function (int $sum, $v): int {
6464
return $sum + count($v);
6565
}, 0);
6666
}

0 commit comments

Comments
 (0)