Inspectopedia
 
2024.3

Type declaration is redundant and could be simplified

Info
New
Last modified: 03 December 2024

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.