Skip to content

MIR0200

InvalidReturnType

The returned value does not match the declared return type.

<?php
function getCount(): int {
return '5'; // string returned, int expected
}

Return a value of the correct type or update the return type declaration.