Skip to content

Commit cdb3138

Browse files
authored
Merge pull request #988 from cakephp/5.x-stan-update
5.x: stan update
2 parents 9975b66 + a42d3ed commit cdb3138

4 files changed

Lines changed: 71 additions & 6 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="1.10.22" installed="1.10.22" location="./tools/phpstan" copy="false"/>
4-
<phar name="psalm" version="5.13.1" installed="5.13.1" location="./tools/psalm" copy="false"/>
3+
<phar name="phpstan" version="1.10.56" installed="1.10.56" location="./tools/phpstan" copy="false"/>
4+
<phar name="psalm" version="5.20.0" installed="5.20.0" location="./tools/psalm" copy="false"/>
55
</phive>

psalm-baseline.xml

Lines changed: 64 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="5.13.1@086b94371304750d1c673315321a55d15fc59015">
2+
<files psalm-version="5.20.0@3f284e96c9d9be6fe6b15c79416e1d1903dcfef4">
3+
<file src="src/Cache/Engine/DebugEngine.php">
4+
<RiskyTruthyFalsyComparison>
5+
<code>$key</code>
6+
</RiskyTruthyFalsyComparison>
7+
</file>
8+
<file src="src/Controller/MailPreviewController.php">
9+
<RiskyTruthyFalsyComparison>
10+
<code><![CDATA[$this->findPart($email, $partType)]]></code>
11+
</RiskyTruthyFalsyComparison>
12+
</file>
313
<file src="src/Database/Log/DebugLog.php">
414
<InternalMethod>
515
<code>jsonSerialize</code>
@@ -11,32 +21,79 @@
1121
<code><![CDATA[$this->_pluginPaths]]></code>
1222
</PossiblyNullArrayOffset>
1323
</file>
24+
<file src="src/DebugMemory.php">
25+
<RiskyTruthyFalsyComparison>
26+
<code>!$message</code>
27+
</RiskyTruthyFalsyComparison>
28+
</file>
1429
<file src="src/DebugSql.php">
1530
<InternalMethod>
1631
<code>bindings</code>
1732
</InternalMethod>
33+
<RiskyTruthyFalsyComparison>
34+
<code>$file</code>
35+
<code>$file</code>
36+
<code>$file</code>
37+
<code>$line</code>
38+
<code>$line</code>
39+
</RiskyTruthyFalsyComparison>
1840
</file>
1941
<file src="src/DebugTimer.php">
2042
<PossiblyNullArrayOffset>
2143
<code>self::$_timers</code>
2244
</PossiblyNullArrayOffset>
45+
<RiskyTruthyFalsyComparison>
46+
<code>!$message</code>
47+
<code>!$name</code>
48+
<code>!$name</code>
49+
</RiskyTruthyFalsyComparison>
2350
</file>
2451
<file src="src/Mailer/MailPreview.php">
2552
<PossiblyFalseOperand>
2653
<code>$pos</code>
2754
</PossiblyFalseOperand>
2855
</file>
56+
<file src="src/Mailer/PreviewResult.php">
57+
<RiskyTruthyFalsyComparison>
58+
<code><![CDATA[!$mailer->viewBuilder()->getTemplate()]]></code>
59+
</RiskyTruthyFalsyComparison>
60+
</file>
2961
<file src="src/Mailer/Transport/DebugKitTransport.php">
3062
<InvalidReturnStatement>
3163
<code>$result</code>
3264
</InvalidReturnStatement>
3365
<MoreSpecificReturnType>
3466
<code>array</code>
3567
</MoreSpecificReturnType>
68+
<NullArgument>
69+
<code><![CDATA[$this->emailLog]]></code>
70+
</NullArgument>
3671
<PropertyTypeCoercion>
3772
<code>new $className($config)</code>
3873
</PropertyTypeCoercion>
3974
</file>
75+
<file src="src/Model/Table/LazyTableTrait.php">
76+
<RiskyTruthyFalsyComparison>
77+
<code><![CDATA[strpos($e->getMessage(), 'unable to open')]]></code>
78+
</RiskyTruthyFalsyComparison>
79+
</file>
80+
<file src="src/Panel/DeprecationsPanel.php">
81+
<RiskyTruthyFalsyComparison>
82+
<code>$pluginName</code>
83+
<code>$vendorName</code>
84+
</RiskyTruthyFalsyComparison>
85+
</file>
86+
<file src="src/Panel/IncludePanel.php">
87+
<RiskyTruthyFalsyComparison>
88+
<code>$pluginName</code>
89+
<code>$vendorName</code>
90+
</RiskyTruthyFalsyComparison>
91+
</file>
92+
<file src="src/Panel/LogPanel.php">
93+
<RiskyTruthyFalsyComparison>
94+
<code><![CDATA[Log::getConfig('debug_kit_log_panel')]]></code>
95+
</RiskyTruthyFalsyComparison>
96+
</file>
4097
<file src="src/Panel/PanelRegistry.php">
4198
<LessSpecificImplementedReturnType>
4299
<code>string|null</code>
@@ -50,6 +107,12 @@
50107
<code>genericInstances</code>
51108
</UndefinedInterfaceMethod>
52109
</file>
110+
<file src="src/ToolbarService.php">
111+
<RiskyTruthyFalsyComparison>
112+
<code><![CDATA[!$GLOBALS['FORCE_DEBUGKIT_TOOLBAR']]]></code>
113+
<code>$enabled</code>
114+
</RiskyTruthyFalsyComparison>
115+
</file>
53116
<file src="src/View/Helper/ToolbarHelper.php">
54117
<InternalClass>
55118
<code>new HtmlFormatter()</code>

src/Controller/PanelsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class PanelsController extends DebugKitController
3131
*/
3232
public function viewClasses(): array
3333
{
34-
return ['json' => JsonView::class];
34+
return [JsonView::class];
3535
}
3636

3737
/**

src/DebugInclude.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ public function __construct()
6666
$packages = array_merge($lockContent['packages'], $lockContent['packages-dev']);
6767

6868
foreach ($packages as $package) {
69-
$this->_composerPaths[$package['name']] = $vendorDir
70-
. str_replace('/', DIRECTORY_SEPARATOR, $package['name'])
69+
/** @var string $name */
70+
$name = $package['name'];
71+
$this->_composerPaths[$name] = $vendorDir
72+
. str_replace('/', DIRECTORY_SEPARATOR, $name)
7173
. DIRECTORY_SEPARATOR;
7274
}
7375
}

0 commit comments

Comments
 (0)