Skip to content

Commit f75c75b

Browse files
committed
Fix psalm errors
1 parent 9826c34 commit f75c75b

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@ Do you like final? _Really_ like it? Then enforce it on all your classes! When y
44

55
## Installation
66

7-
### Running Psalm 5
7+
### Running Psalm 6
88

99
```
1010
composer require --dev cspray/phinal
1111
vendor/bin/psalm-plugin enable cspray/phinal
1212
```
1313

14+
### Running Psalm 5
15+
16+
```
17+
composer require --dev cspray/phinal:2.1
18+
vendor/bin/psalm-plugin enable cspray/phinal
19+
```
20+
1421
### Running Psalm 4
1522

1623
```

psalm.xml.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
xmlns="https://getpsalm.org/schema/config"
55
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
66
errorLevel="1"
7+
findUnusedBaselineEntry="true"
8+
findUnusedCode="true"
79
>
810
<projectFiles>
911
<directory name="." />

src/Plugin.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
use Psalm\Plugin\RegistrationInterface;
1313

1414
/** @psalm-suppress UnusedClass */
15-
class Plugin implements PluginEntryPointInterface, AfterClassLikeAnalysisInterface
15+
final class Plugin implements PluginEntryPointInterface, AfterClassLikeAnalysisInterface
1616
{
17-
/** @return void */
17+
#[\Override]
1818
public function __invoke(RegistrationInterface $psalm, ?SimpleXMLElement $config = null): void
1919
{
2020
// Psalm allows arbitrary content to be stored under you plugin entry in
@@ -25,6 +25,7 @@ public function __invoke(RegistrationInterface $psalm, ?SimpleXMLElement $config
2525
$psalm->registerHooksFromClass($this::class);
2626
}
2727

28+
#[\Override]
2829
public static function afterStatementAnalysis(AfterClassLikeAnalysisEvent $event)
2930
{
3031
$stmt = $event->getStmt();

tests/_support/AcceptanceTester.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* @psalm-suppress UndefinedTrait
2020
* @psalm-suppress UnusedClass
2121
*/
22-
class AcceptanceTester extends \Codeception\Actor
22+
final class AcceptanceTester extends \Codeception\Actor
2323
{
2424
use _generated\AcceptanceTesterActions;
2525

tests/_support/Helper/Acceptance.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
// all public methods declared in helper class will be available in $I
77

88
/** @psalm-suppress UnusedClass */
9-
class Acceptance extends \Codeception\Module
9+
final class Acceptance extends \Codeception\Module
1010
{
1111
}

0 commit comments

Comments
 (0)