test(phpstan): enable PHPStan level 3 for WebServices/#1033
Merged
JohnVillalovos merged 1 commit intodevelopfrom Feb 16, 2026
Merged
test(phpstan): enable PHPStan level 3 for WebServices/#1033JohnVillalovos merged 1 commit intodevelopfrom
WebServices/#1033JohnVillalovos merged 1 commit intodevelopfrom
Conversation
Resolve PHPStan level 3 issues found when enabling checking of the `WebServices/` directory
Contributor
There was a problem hiding this comment.
Pull request overview
Enables PHPStan level 3 analysis for WebServices/ by removing it from the staged exclusion list and addressing newly surfaced type/contract issues in several web service controllers and response DTOs.
Changes:
- Include
WebServices/inphpstan_next.neonlevel 3 analysis by removing its exclusion. - Normalize several “nullable”/mixed return values to concrete scalars (e.g.,
0,'') and tighten some method signatures to satisfy PHPStan. - Refine response/DTO phpdoc and property typing for collections and ISO datetime fields.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
phpstan_next.neon |
Removes staged exclusion so PHPStan level 3 now analyzes WebServices/. |
WebServices/SchedulesWebService.php |
Adjusts ISchedulePage implementation return values and makes an unimplemented method explicit via exception. |
WebServices/Responses/ScheduleResponse.php |
Tightens $periods phpdoc to reflect keyed structure. |
WebServices/Responses/Resource/ResourceAvailabilityResponse.php |
Switches availability timestamps to nullable ISO string properties. |
WebServices/Responses/CustomAttributes/CustomAttributeDefinitionResponse.php |
Corrects possibleValues typing and simplifies the example payload to valid enum values. |
WebServices/Responses/AccessoriesResponse.php |
Fixes accessories collection typing and initializes to an empty list. |
WebServices/ReservationsWebService.php |
Casts query-string IDs to ints/null to satisfy type expectations. |
WebServices/Controllers/ReservationSaveController.php |
Aligns recurrence interval type with IRepeatOptionsComposite and normalizes missing resourceId to 0. |
WebServices/Controllers/GroupSaveController.php |
Adds return phpdoc for GetAllowedResourceIds() string format. |
WebServices/Controllers/AttributeSaveController.php |
Adds parameter/return typing to GetPossibleValues(). |
Pages/Admin/ManageGroupsPage.php |
Updates GetAllowedResourceIds() phpdoc to include string IDs used for permission encoding. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolve PHPStan level 3 issues found when enabling checking of the
WebServices/directory