Skip to content

MIR1212

MixedReturnStatement

A mixed value is returned from a function with a typed return.

<?php
function f(): int { /** @var mixed $x */ return $x; }

Narrow the value to the declared return type.