Skip to content

MIR1512

PrivateFinalMethod

A private method is never overridden by a child class, so final on it has no effect. PHP warns about it for every method except the constructor.

<?php
class A {
final private function helper(): void {}
}

Drop final, or make the method protected if child classes should see it but not override it.