-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add psalm #53
Conversation
WalkthroughThe recent changes introduce Psalm static analysis to the project, enhancing code quality and safety. This includes adding Psalm configuration, updating the workflow to run Psalm checks, and modifying several files to align with Psalm's requirements. Additionally, type declarations and annotations were refined to improve code clarity and robustness. Changes
Assessment against linked issues
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (10)
Files skipped from review due to trivial changes (4)
Additional context usedPHPStan
Additional comments not posted (7)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
plugin.php (1)
Line range hint
19-30
: The use of a static variable for$package
and the Psalm suppress annotation are appropriate for handling dynamic includes and maintaining a singleton pattern in the plugin. Consider refactoring theautoload
function into a top-level function or a static method to resolve the PHPStan issue.- function autoload(string $projectRoot): void { + static function autoload(string $projectRoot): void {Tools
PHPStan
17-17: Function Widoz\Wp\EntitiesSearch\package() has invalid return type Inpsyde\Modularity\Package.
Fix #51
Summary by CodeRabbit
New Features
Chores
.gitignore
to exclude the/psalm
directory.vimeo/psalm
as a development dependency incomposer.json
.Documentation
phpstorm.meta.php
for better type hinting in PhpStorm.Refactor
$package
variable inplugin.php
.Style