Skip to content

OverriddenMethodAccess

An overriding method reduces the visibility of the parent method.

<?php
class Base {
public function render(): void {}
}
class Child extends Base {
protected function render(): void {} // reducing public to protected
}

Keep the same or wider visibility in the overriding method.