Skip to content

Update validation rule type hint and reorder imports for consistency - #25

Merged
roble merged 2 commits into
mainfrom
dev
Mar 13, 2026
Merged

Update validation rule type hint and reorder imports for consistency#25
roble merged 2 commits into
mainfrom
dev

Conversation

@roble

@roble roble commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

This pull request primarily addresses minor code cleanup and consistency improvements across several backend request files and frontend Vue component imports. The main focus is on standardizing type usage in validation rules and organizing import statements for better readability.

Backend validation improvements:

  • Standardized the type hint in the rules() method return docblock for UpdatePasswordRequest, UpdateProfileAvatarRequest, and UpdateProfileInfoRequest to use ValidationRule instead of the fully qualified interface, improving code clarity and consistency. [1] [2] [3]
  • Added the ValidationRule import to the top of each corresponding request file for proper type referencing. [1] [2] [3]

Frontend import organization:

  • Adjusted the order of imports in Profile.vue and ChangePassword.vue to place the SettingsLayout import above other imports, aligning with project conventions. [1] [2]
  • Reordered imports in Edit.vue to place SettingsLayout before PageHeader, improving readability.

Copilot AI review requested due to automatic review settings March 13, 2026 21:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR performs small consistency cleanups in the Settings module by standardizing backend validation rule phpdoc types and reordering frontend Vue imports for readability.

Changes:

  • Update rules() return phpdoc annotations to reference ValidationRule (via import) instead of a fully-qualified name.
  • Add ValidationRule imports to the affected Laravel FormRequest classes.
  • Reorder SettingsLayout / PageHeader imports in Settings-related Vue pages.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
resources/js/pages/Profile/Edit.vue Reorders SettingsLayout and PageHeader imports.
resources/js/pages/Profile/ChangePassword.vue Reorders SettingsLayout import relative to other imports.
resources/js/pages/Profile.vue Reorders SettingsLayout import relative to other imports.
app/Http/Requests/UpdateProfileInfoRequest.php Imports ValidationRule and uses it in the rules() phpdoc return type.
app/Http/Requests/UpdateProfileAvatarRequest.php Imports ValidationRule and uses it in the rules() phpdoc return type.
app/Http/Requests/UpdatePasswordRequest.php Imports ValidationRule and uses it in the rules() phpdoc return type.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +5 to 6
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
Comment on lines +5 to 6
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
Comment on lines +5 to 6
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
@roble
roble merged commit 41f6660 into main Mar 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants