Skip to content

MethodSignatureMismatch

An overriding method has a signature incompatible with the parent’s.

<?php
class Base {
public function process(string $input): string { return $input; }
}
class Child extends Base {
public function process(int $input): string { return (string) $input; } // parameter type changed
}

Make the overriding method’s signature compatible with the parent’s (contravariant parameters, covariant return types).