Updated PHPDoc and PHPStan annotations#91
Conversation
WalkthroughPHPDoc comments specifying return type annotations for several methods were removed across multiple controller and action classes. Additionally, class-level PHPDoc annotations were introduced or updated to clarify generic type relationships for certain action classes. No functional or structural code changes were made. Changes
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/usecase/contact/IndexAction.php (1)
11-13: Prefer fully-qualified class reference in the annotationTo make the annotation resilient to future namespace changes and clearer to tools that do not resolve relative names inside PHPDoc, consider:
- * @extends Action<ContactController> + * @extends Action<\app\usecase\contact\ContactController>A tiny nit, but it can avoid surprises in large codebases.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
src/usecase/Controller.php(0 hunks)src/usecase/contact/ContactController.php(0 hunks)src/usecase/contact/ContactForm.php(0 hunks)src/usecase/contact/IndexAction.php(1 hunks)src/usecase/site/AboutAction.php(1 hunks)src/usecase/site/SiteController.php(0 hunks)
💤 Files with no reviewable changes (4)
- src/usecase/contact/ContactForm.php
- src/usecase/site/SiteController.php
- src/usecase/Controller.php
- src/usecase/contact/ContactController.php
🔇 Additional comments (1)
src/usecase/site/AboutAction.php (1)
9-11: Ensure a generic-aware stub foryii\base\Actionexists
@extends Action<SiteController>only improves static analysis if PHPStan seesActionas a generic class. Verify that a stub (or an upgradedyiisoft/yii2-stubs) declares something like/** * @template TController of \yii\web\Controller * @extends \yii\base\Component */ abstract class Action { /* … */ }Without it, the angle-bracket parameter is ignored and you lose the intended type-safety.
|
Thks 👍 |
Removed unnecessary annotations. Missing annotations have also been added.
Summary by CodeRabbit