Skip to content

Commit 236df3f

Browse files
committed
fixed psalm issues
1 parent 338ebd2 commit 236df3f

File tree

2 files changed

+32
-19
lines changed

2 files changed

+32
-19
lines changed

psalm.xml

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,38 @@
11
<?xml version="1.0"?>
22
<psalm
3-
resolveFromConfigFile="true"
4-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xmlns="https://getpsalm.org/schema/config"
6-
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
3+
errorLevel="4"
4+
usePhpDocMethodsWithoutMagicCall="true"
5+
findUnusedPsalmSuppress="true"
6+
findUnusedBaselineEntry="true"
7+
findUnusedCode="false"
8+
resolveFromConfigFile="true"
9+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xmlns="https://getpsalm.org/schema/config"
11+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
12+
autoloader="tests/bootstrap.php"
713
>
8-
<projectFiles>
9-
<directory name="src" />
10-
<ignoreFiles>
11-
<directory name="vendor" />
12-
</ignoreFiles>
13-
</projectFiles>
14+
<projectFiles>
15+
<directory name="src/"/>
16+
<ignoreFiles>
17+
<directory name="vendor/"/>
18+
</ignoreFiles>
19+
</projectFiles>
1420

15-
<issueHandlers>
16-
<MissingClosureReturnType errorLevel="info" />
21+
<issueHandlers>
22+
<LessSpecificReturnType errorLevel="suppress" />
23+
<RedundantPropertyInitializationCheck errorLevel="suppress"/>
24+
<RedundantCast errorLevel="suppress"/>
25+
<UndefinedAttributeClass errorLevel="suppress"/>
26+
<LessSpecificReturnType errorLevel="info" />
1727

18-
<PropertyNotSetInConstructor errorLevel="info" />
19-
<MissingConstructor errorLevel="info" />
20-
<MissingClosureParamType errorLevel="info" />
28+
<MissingClosureReturnType errorLevel="info" />
2129

22-
<DocblockTypeContradiction errorLevel="info" />
23-
<RedundantConditionGivenDocblockType errorLevel="info" />
24-
</issueHandlers>
30+
<PropertyNotSetInConstructor errorLevel="info" />
31+
<MissingConstructor errorLevel="info" />
32+
<MissingClosureParamType errorLevel="info" />
33+
<MissingParamType errorLevel="info" />
34+
35+
<DocblockTypeContradiction errorLevel="info" />
36+
<RedundantConditionGivenDocblockType errorLevel="info" />
37+
</issueHandlers>
2538
</psalm>

src/View/Helper/DatatableHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class DatatableHelper extends Helper
6060
];
6161

6262
// @todo maybe array of instances
63-
private Datatable $dtInstance;
63+
private ?Datatable $dtInstance = null;
6464

6565
/**
6666
* @param array $config

0 commit comments

Comments
 (0)