Skip to content

test(phpstan): enable PHPStan level 3 for WebServices/#1033

Merged
JohnVillalovos merged 1 commit intodevelopfrom
jlvillal/phpstan_3
Feb 16, 2026
Merged

test(phpstan): enable PHPStan level 3 for WebServices/#1033
JohnVillalovos merged 1 commit intodevelopfrom
jlvillal/phpstan_3

Conversation

@JohnVillalovos
Copy link
Collaborator

Resolve PHPStan level 3 issues found when enabling checking of the WebServices/ directory

Resolve PHPStan level 3 issues found when enabling checking of the
`WebServices/` directory
Copilot AI review requested due to automatic review settings February 16, 2026 22:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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/ in phpstan_next.neon level 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.

@JohnVillalovos JohnVillalovos merged commit 481f700 into develop Feb 16, 2026
21 checks passed
@JohnVillalovos JohnVillalovos deleted the jlvillal/phpstan_3 branch February 16, 2026 23:07
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.

1 participant