Skip to content

Commit 553c47a

Browse files
authored
Merge pull request #812 from cakephp/upgrade-psalm
Upgrade to psalm 4.3
2 parents b63e9be + 30110e6 commit 553c47a

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"cs-fix": "phpcbf --colors --parallel=16 -p src/ tests/",
5757
"test": "phpunit",
5858
"psalm": "psalm.phar --show-info=false",
59-
"psalm-setup": "cp composer.json composer.backup && composer require --dev psalm/phar:^3.11 && mv composer.backup composer.json"
59+
"psalm-setup": "cp composer.json composer.backup && composer require --dev psalm/phar:^4.3 && mv composer.backup composer.json"
6060
},
6161
"prefer-stable": true
6262
}

psalm-baseline.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<files psalm-version="3.18.2@19aa905f7c3c7350569999a93c40ae91ae4e1626">
33
<file src="src/Controller/DashboardController.php">
4-
<InvalidNullableReturnType occurrences="1">
5-
<code>\Cake\Http\Response</code>
6-
</InvalidNullableReturnType>
74
<NullableReturnStatement occurrences="1">
85
<code>$this-&gt;redirect(['action' =&gt; 'index'])</code>
96
</NullableReturnStatement>
@@ -19,9 +16,6 @@
1916
</InternalProperty>
2017
</file>
2118
<file src="src/DebugInclude.php">
22-
<InvalidNullableReturnType occurrences="1">
23-
<code>string</code>
24-
</InvalidNullableReturnType>
2519
<PossiblyNullArrayOffset occurrences="2">
2620
<code>$this-&gt;_composerPaths</code>
2721
<code>$this-&gt;_pluginPaths</code>

src/Controller/DashboardController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function index()
5757
/**
5858
* Reset SQLite DB.
5959
*
60-
* @return \Cake\Http\Response
60+
* @return \Cake\Http\Response|null
6161
*/
6262
public function reset()
6363
{

src/DebugInclude.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
use Cake\Core\Plugin as CorePlugin;
1818
use Composer\Json\JsonFile;
19+
use InvalidArgumentException;
1920

2021
/**
2122
* Contains methods for Providing list of files.
@@ -173,6 +174,8 @@ public function niceFileName($file, $type, $name = null)
173174
case 'vendor':
174175
return str_replace($this->_composerPaths[$name], '', $file);
175176
}
177+
178+
throw new InvalidArgumentException("Type `{$type}` is not supported.");
176179
}
177180

178181
/**

src/Panel/MailPanel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class MailPanel extends DebugPanel
2929
/**
3030
* The list of emails produced during the request
3131
*
32-
* @var \ArrayObject
32+
* @var \ArrayObject|null
3333
*/
3434
protected $emailLog;
3535

0 commit comments

Comments
 (0)