Skip to content

Commit 5b6606c

Browse files
committed
Update Psalm to 6.3.0
1 parent 6351764 commit 5b6606c

File tree

4 files changed

+47
-4
lines changed

4 files changed

+47
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"require-dev": {
1717
"php-coveralls/php-coveralls": "^2.5",
1818
"phpunit/phpunit": "^10.1.0",
19-
"vimeo/psalm": "5.15.0"
19+
"vimeo/psalm": "6.3.0"
2020
},
2121
"autoload": {
2222
"psr-4": {

psalm-baseline.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<files psalm-version="6.3.0@222dda8483516044c2ed7a4c3f197d7c9d6c3ddb">
3+
<file src="src/NameMapper/CamelCaseToSnakeCaseMapper.php">
4+
<InvalidNullableReturnType>
5+
<code><![CDATA[string]]></code>
6+
</InvalidNullableReturnType>
7+
<NullableReturnStatement>
8+
<code><![CDATA[preg_replace_callback(
9+
'/[A-Z]/',
10+
fn (array $matches) => '_' . strtolower($matches[0]),
11+
$name,
12+
)]]></code>
13+
</NullableReturnStatement>
14+
</file>
15+
<file src="src/NameMapper/SnakeCaseToCamelCaseMapper.php">
16+
<InvalidNullableReturnType>
17+
<code><![CDATA[string]]></code>
18+
</InvalidNullableReturnType>
19+
<NullableReturnStatement>
20+
<code><![CDATA[preg_replace_callback(
21+
'/_([a-z])/',
22+
fn (array $matches) => strtoupper($matches[1]),
23+
$name,
24+
)]]></code>
25+
</NullableReturnStatement>
26+
</file>
27+
<file src="src/Reflection/Reflector.php">
28+
<PossiblyNullArgument>
29+
<code><![CDATA[$type]]></code>
30+
</PossiblyNullArgument>
31+
</file>
32+
</files>

psalm.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
88
findUnusedPsalmSuppress="true"
99
findUnusedVariablesAndParams="true"
10+
errorBaseline="psalm-baseline.xml"
1011
>
1112
<projectFiles>
1213
<directory name="src" />
@@ -18,4 +19,17 @@
1819
<file name="tests/Classes/KitchenSink.php" />
1920
</ignoreFiles>
2021
</projectFiles>
22+
23+
<issueHandlers>
24+
<PossiblyUnusedMethod>
25+
<errorLevel type="suppress">
26+
<directory name="tests" />
27+
</errorLevel>
28+
</PossiblyUnusedMethod>
29+
<UnusedClass>
30+
<errorLevel type="suppress">
31+
<directory name="tests" />
32+
</errorLevel>
33+
</UnusedClass>
34+
</issueHandlers>
2135
</psalm>

src/Reflection/Type/SimpleType.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
*/
1212
final class SimpleType implements Stringable
1313
{
14-
/**
15-
* @psalm-param 'int'|'float'|'string'|'bool'|'true'|'false'|'null'|'array'|'object'|'mixed' $type
16-
*/
1714
public function __construct(
1815
public readonly string $name,
1916
) {

0 commit comments

Comments
 (0)