feat(attribute): Add HasCharset trait and charset() method to manage charset attribute for HTML elements.#49
Conversation
…age `charset` attribute for HTML elements.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughAdds support for the HTML Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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/HasCharset.php`:
- Around line 60-65: Add a unit test in HasCharsetTest that verifies
HasCharset::charset rejects invalid values: instantiate an object that uses
HasAttributes and HasCharset, call charset with an invalid value like
'invalid-charset', and assert that an InvalidArgumentException is thrown (this
ensures Validator::oneOf against Charset::cases() is exercised).
🧹 Nitpick comments (1)
src/Values/Charset.php (1)
134-138: Minor formatting inconsistency.Missing blank line between
UTF_32LEandUTF_8cases, unlike all other cases in this enum.🔧 Suggested fix
case UTF_32LE = 'utf-32le'; + /** * `utf-8` — Unicode UTF-8 encoding (the only valid encoding for HTML5 documents). */ case UTF_8 = 'utf-8';
Pull Request
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.