Skip to content

Commit

Permalink
Psalm 6 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
BafS committed Feb 4, 2025
1 parent 822bc4f commit 3e2236e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Register the plugin in psalm.xml:

You can run psalm (typically `./vendor/bin/psalm`) and the report will get generated on the fly.

Note: If you have issues with missing files, try using the `--no-cache` flag.
Note: If you want to always scan all the files, you need to use the `--no-cache` flag.

## Screenshoot

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"require": {
"php": ">=8.0",
"vimeo/psalm": "^5.0"
"vimeo/psalm": "^5.0 || ^6.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.3"
Expand All @@ -16,6 +16,7 @@
}
},
"scripts": {
"cs-check": "phpcs --extensions=php --standard=PSR12 src"
"cs-check": "phpcs --extensions=php --standard=PSR12 src",
"psalm": "psalm --no-cache"
}
}
1 change: 1 addition & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
findUnusedCode="false"
>
<projectFiles>
<directory name="src" />
Expand Down
1 change: 0 additions & 1 deletion src/Report/Html/template/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,5 @@
(a, b) => compareNumber(cleanNumber(b), cleanNumber(a)),
);
</script>

</body>
</html>
3 changes: 2 additions & 1 deletion src/TypeCoverage.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public function __invoke(RegistrationInterface $registration, ?SimpleXMLElement
/**
* Called after analysis is complete
*/
public static function afterAnalysis(AfterAnalysisEvent $event): void {
public static function afterAnalysis(AfterAnalysisEvent $event): void
{
$codebase = $event->getCodebase();

self::createReporter()->generate(self::getNonMixedStats($codebase));
Expand Down

0 comments on commit 3e2236e

Please # to comment.