Adds Student Research Form Validations #201
Annotations
4 errors and 1 warning
Static analyze code (PSALM):
app/Http/Requests/StudentUpdateRequest.php#L16
app/Http/Requests/StudentUpdateRequest.php:16:16: InvalidReturnType: The declared return type 'array<string, Illuminate\Contracts\Validation\Rule|array<array-key, mixed>|string>' for App\Http\Requests\StudentUpdateRequest::rules is incorrect, got 'array{'faculty.*': list{'integer', Illuminate\Validation\Rules\Exists&static}, 'research_profile.*': Closure, 'research_profile.availability': 'sometimes|array', 'research_profile.brief_intro': 'sometimes|string|max:280', 'research_profile.credit': 'required|numeric|between:-1,1', 'research_profile.graduation_date': 'required|date|after:today', 'research_profile.interest': 'sometimes|string|max:280', 'research_profile.intro': 'sometimes|string|max:280', 'research_profile.lang_proficiency': 'sometimes|array', 'research_profile.lang_proficiency.*': 'string|in:limited,basic,professional,native', 'research_profile.languages': 'sometimes|array', 'research_profile.languages.*': list{Illuminate\Validation\Rules\In}, 'research_profile.major': list{'required', Illuminate\Validation\Rules\In}, 'research_profile.schools': 'required|array', 'research_profile.schools.*': list{'sometimes', 'string', Illuminate\Validation\Rules\In}, 'research_profile.semesters': 'required|array', 'research_profile.semesters.*': list{'required', 'string', 'regex:/\\b(Winter|Spring|Summer|Fall)\\s\\d{4}\\b/'}, full_name: 'required|string'}' (see https://psalm.dev/011)
|
Static analyze code (PSALM):
app/Http/Requests/StudentUpdateRequest.php#L22
app/Http/Requests/StudentUpdateRequest.php:22:16: InvalidReturnStatement: The inferred type 'array{'faculty.*': list{'integer', Illuminate\Validation\Rules\Exists&static}, 'research_profile.*': Closure, 'research_profile.availability': 'sometimes|array', 'research_profile.brief_intro': 'sometimes|string|max:280', 'research_profile.credit': 'required|numeric|between:-1,1', 'research_profile.graduation_date': 'required|date|after:today', 'research_profile.interest': 'sometimes|string|max:280', 'research_profile.intro': 'sometimes|string|max:280', 'research_profile.lang_proficiency': 'sometimes|array', 'research_profile.lang_proficiency.*': 'string|in:limited,basic,professional,native', 'research_profile.languages': 'sometimes|array', 'research_profile.languages.*': list{Illuminate\Validation\Rules\In}, 'research_profile.major': list{'required', Illuminate\Validation\Rules\In}, 'research_profile.schools': 'required|array', 'research_profile.schools.*': list{'sometimes', 'string', Illuminate\Validation\Rules\In}, 'research_profile.semesters': 'required|array', 'research_profile.semesters.*': list{'required', 'string', 'regex:/\\b(Winter|Spring|Summer|Fall)\\s\\d{4}\\b/'}, full_name: 'required|string'}' does not match the declared return type 'array<string, Illuminate\Contracts\Validation\Rule|array<array-key, mixed>|string>' for App\Http\Requests\StudentUpdateRequest::rules (see https://psalm.dev/128)
|
Static analyze code (PSALM):
app/Http/Requests/StudentUpdateRequest.php#L30
app/Http/Requests/StudentUpdateRequest.php:30:26: ImplicitToStringCast: Argument 1 of Illuminate\Validation\Rule::in expects Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<array-key, mixed>|string, but Illuminate\Support\Collection provided with a __toString method (see https://psalm.dev/060)
|
Static analyze code (PSALM)
Process completed with exit code 2.
|
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions/cache@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Loading