-
-
Notifications
You must be signed in to change notification settings - Fork 742
Closed
rectorphp/rector-src
#4556Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | last dev-main |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/4239ac15-dcf4-4803-a463-bfe14312e1f2
<?php
trait SitesConfigTrait
{
public function getAllSiteNames(): array
{
return array_keys($this->getAllSitesConfig());
}
public function getSitesCount(): int
{
return count($this->getAllSitesConfig());
}
}Responsible rules
CountOnNullRector
Expected Behavior
I expect no issue on this line since the called method getAllSiteNames() specifies a return type of array, but rector is behaving as if it could return NULL.
Reactions are currently unavailable