Conversation
📝 WalkthroughWalkthroughValidation rules in two Laravel request classes were refactored to use object-based Changes
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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.
🧹 Nitpick comments (2)
app/Http/Requests/Api/Remote/SftpAuthenticationFormRequest.php (1)
20-29: PHPDoc return type is now inaccurate.The
@return array<string, string[]>annotation no longer matches the actual return type. Thetyperule array now contains aRule::in()object (Illuminate\Validation\Rules\In), not just strings.📝 Suggested fix
/** * Rules to apply to the request. * - * `@return` array<string, string[]> + * `@return` array<string, array<int, mixed>> */ public function rules(): array🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/Http/Requests/Api/Remote/SftpAuthenticationFormRequest.php` around lines 20 - 29, The PHPDoc on the rules() method in SftpAuthenticationFormRequest is incorrect because the 'type' rule now includes a Rule::in() object (Illuminate\Validation\Rules\In); update the docblock for public function rules(): array to a more accurate return type such as array<string, array<int, mixed>> or array<string, array> (or explicitly mention string|Illuminate\Validation\Rules\In) so the `@return` matches the actual values returned by rules().app/Http/Requests/Api/Remote/ReportBackupCompleteRequest.php (1)
10-10: PHPDoc return type is now inaccurate.The
@return array<array-key, string|string[]>annotation no longer matches the actual return type. The arrays now containRule::requiredIf()objects (Illuminate\Validation\Rules\RequiredIf), not just strings.📝 Suggested fix
- /** `@return` array<array-key, string|string[]> */ + /** `@return` array<string, array<int, mixed>> */ public function rules(): array🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/Http/Requests/Api/Remote/ReportBackupCompleteRequest.php` at line 10, Update the PHPDoc on ReportBackupCompleteRequest (the rules() return annotation) to include the RequiredIf rule objects returned by Rule::requiredIf(); specifically change the return type from array<array-key, string|string[]> to include Illuminate\Validation\Rules\RequiredIf (e.g. array<array-key, string|string[]|\Illuminate\Validation\Rules\RequiredIf>) so the docblock accurately reflects that arrays may contain RequiredIf instances as well as strings/arrays.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@app/Http/Requests/Api/Remote/ReportBackupCompleteRequest.php`:
- Line 10: Update the PHPDoc on ReportBackupCompleteRequest (the rules() return
annotation) to include the RequiredIf rule objects returned by
Rule::requiredIf(); specifically change the return type from array<array-key,
string|string[]> to include Illuminate\Validation\Rules\RequiredIf (e.g.
array<array-key, string|string[]|\Illuminate\Validation\Rules\RequiredIf>) so
the docblock accurately reflects that arrays may contain RequiredIf instances as
well as strings/arrays.
In `@app/Http/Requests/Api/Remote/SftpAuthenticationFormRequest.php`:
- Around line 20-29: The PHPDoc on the rules() method in
SftpAuthenticationFormRequest is incorrect because the 'type' rule now includes
a Rule::in() object (Illuminate\Validation\Rules\In); update the docblock for
public function rules(): array to a more accurate return type such as
array<string, array<int, mixed>> or array<string, array> (or explicitly mention
string|Illuminate\Validation\Rules\In) so the `@return` matches the actual values
returned by rules().
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 3f16a493-15e2-460c-8d4e-17b7303e0412
📒 Files selected for processing (2)
app/Http/Requests/Api/Remote/ReportBackupCompleteRequest.phpapp/Http/Requests/Api/Remote/SftpAuthenticationFormRequest.php
This is an automated pull request included with your Shifty Plan. It contains curated refactors to keep your Laravel application aligned with the latest conventions and features.
This month focuses on adopting Laravel's fluent
Rulebuilder such asRule::date(),Rule::in(),Rule::exist(), and more. These streamline otherwise dense configuration strings.Before merging, you should:
shift-2026-04branchIf you do not wish to adopt these refactors, you may simply close this pull request and delete its branch.