Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 359 Bytes

InvalidOverride.md

File metadata and controls

24 lines (18 loc) · 359 Bytes

InvalidOverride

Emitted when an Override attribute was added to a method that does not override a method from a parent class or implemented interface.

<?php

class A {
    function receive(): void
    {
    }
}

class B extends A {
    #[Override]
    function recieve(): void
    {
    }
}

Why this is bad

A fatal error will be thrown.