-
-
Notifications
You must be signed in to change notification settings - Fork 737
Closed
rectorphp/rector-src
#6718Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | last dev-main |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/c655ef2d-fc8b-413b-b22d-eb903cd113a7
<?php
trait SomeTrait
{
public function run(bool $param): bool
{
return (bool) ($this->config['allow_404'] ?? false);
}
}On trait, the valid cast is removed on union falsy mixed.
Responsible rules
RecastingRemovalRector
Expected Behavior
should be skipped.