Repository navigation
Fix #20766: Fix @param annotation for $offset in yii\db\ArrayExpression::offsetSet(), fix yii\db\ArrayExpression::offsetSet() to append when $offset is null - #20766
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20766 +/- ##
============================================
- Coverage 81.91% 81.90% -0.01%
- Complexity 11560 11562 +2
============================================
Files 374 374
Lines 30305 30307 +2
============================================
Hits 24824 24824
- Misses 5481 5483 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. ℹ️ Recent review info
📜 Recent review details
📝 Summary
Merge Risk:
|
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 3.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 30 functions across 2 files. (1 skipped: 1… | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
-
Check name Status Explanation Title check ✅ Passed The title clearly identifies the added ArrayExpressionTest and the offsetSet() PHPDoc fix, which are the main changes. Description check ✅ Passed The description directly explains the new tests, the offsetSet(null, ...) behavior, and the PHPDoc correction. Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 3.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 30 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches: 💡 1
-
🧪 Generate unit tests (beta)
-
- Create a new PR
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
A rabbit taps a null-keyed row
And watches fresh values grow
ArrayExpression keeps count in sight
Its iterator hops through each byte
Tests trace the paths from start to end
Then the rabbit thumps: append, my friend!
Comment @coderabbitai help to get the list of available commands.
ArrayExpressionTestArrayExpressionTest and fix offsetSet() PHPDoc
…x/yii2 into pr/WarLikeLaux/20766
… and add corresponding tests.
ArrayExpressionTest and fix offsetSet() PHPDoc@param annotation for $offset in yii\db\ArrayExpression::offsetSet(), fix yii\db\ArrayExpression::offsetSet() to append when $offset is null
|
👍 |
What does this PR do?
Adds
ArrayExpressionTest- unit tests foryii\db\ArrayExpression.The tests exercise
$expr[] = ...(append), which makes PHP calloffsetSet(null, ...). The method's@param int|string $offsetdid not allownull, so this PR widens it toint|string|nullto match the actualArrayAccesscontract.Coverage
28 tests, 47 assertions. Line coverage: 19/19 (100%). MSI: 100% (18/18).