feat(dev): Add php-forge/coding-standard to development dependencies for code quality checks.#28
Conversation
…s for code quality checks.
…ultiple attributes.
📝 WalkthroughWalkthroughThis PR updates developer tooling configs (composer, ECS, Rector), adds a changelog entry, and revises many trait docblocks to import Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/Element/HasReferrerpolicy.php`:
- Line 25: The PHPDoc `@method` annotation for addAttribute mistakenly wraps the
union type in parentheses (`(string|UnitEnum) $key`); update the annotation to
use the correct union syntax without parentheses—change the parameter type to
`string|UnitEnum $key` in the `@method` line for addAttribute so
phpDocumentor/PSR-5 tooling parses it correctly.
♻️ Duplicate comments (4)
src/HasCrossorigin.php (1)
25-25: Consistent with PR-wide docblock update.Same parenthesized union type pattern as other files. Verification requested in
HasReferrerpolicy.phpreview comment applies here.src/Global/HasStyle.php (1)
24-24: Consistent with PR-wide docblock update.Same parenthesized union type pattern. Verification requested in
HasReferrerpolicy.phpapplies here.src/HasFetchpriority.php (1)
26-26: Consistent with PR-wide docblock update.Same parenthesized union type pattern. Verification requested in
HasReferrerpolicy.phpapplies here.src/Element/HasHeight.php (1)
23-23: Consistent with PR-wide docblock update.Same parenthesized union type pattern. Verification requested in
HasReferrerpolicy.phpapplies here.
🧹 Nitpick comments (2)
src/Global/HasTabindex.php (1)
11-11: Potentially unused import.The
UnitEnumimport is added but thetabIndex()method signature (line 55) only acceptsint|string|null, notUnitEnum. The import appears to exist solely for the@methoddocblock annotation documenting theaddAttributemethod from a different trait.While this is valid PHP and documents the dependency correctly, static analysis tools may flag it as unused depending on configuration.
src/Element/HasHref.php (1)
23-23: Unnecessary parentheses in PHPDoc union type.The parentheses around
string|UnitEnumare redundant. While parentheses are valid in PHPDoc for disambiguation (e.g.,(Foo|Bar)[]to denote an array of unions), they're unnecessary here since there are no complex type modifiers. Removing them would align with typical PHPDoc style.📝 Suggested fix
- * `@method` static addAttribute((string|UnitEnum) $key, mixed $value) Adds an attribute and returns a new instance. + * `@method` static addAttribute(string|UnitEnum $key, mixed $value) Adds an attribute and returns a new instance.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Pull Request
Summary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.