Inspectopedia
 
2024.3

Method does not override the method from its superclass

Error
New
Last modified: 03 December 2024

Reports usage of the #[Override] attribute with a method that doesn't have a parent method to override.

Usage of the #[Override] attribute to express intention in code is supported in PHP 8.3 and later. See PHP RFC: Marking overridden methods (wiki.php.net) for details.