Skip to content

Fix PHPStan: remove unnecessary null coalescing on non-nullable bool properties#348

Merged
jbrooksuk merged 1 commit intomainfrom
copilot/fix-phpstan-issues
Apr 16, 2026
Merged

Fix PHPStan: remove unnecessary null coalescing on non-nullable bool properties#348
jbrooksuk merged 1 commit intomainfrom
copilot/fix-phpstan-issues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

PHPStan (level 5) was failing because ?? was used on properties typed as non-nullable bool, which is invalid.

Changes

  • src/Actions/Incident/CreateIncident.php — removed ?? false from $data->visible, $data->notifications, and $data->stickied in parseTemplate(); these are bool (never null) per CreateIncidentRequestData's constructor signature, making the null coalescing redundant

@jbrooksuk jbrooksuk marked this pull request as ready for review April 16, 2026 06:03
@jbrooksuk jbrooksuk merged commit 445ccdb into main Apr 16, 2026
31 checks passed
@jbrooksuk jbrooksuk deleted the copilot/fix-phpstan-issues branch April 16, 2026 06:04
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