PhpStorm
 
Get PhpStorm
You are viewing the documentation for an earlier version of PhpStorm.

Code Inspection: Type declaration is redundant and could be simplified

Last modified: 16 May 2022

Reports union type declarations that contain redundant types, for example, a union type that contains both the class alias and the original class.

See Union Types RFC: Duplicate and redundant types (php.net) for details.