src/Matcher/ToReceive.php
protected function _reference($reference)
    {
        if (!is_string($reference)) {
            return $reference;
        }

        $pos = strrpos($reference, '\\');
        if ($pos !== false) {
            $namespace = substr($reference, 0, $pos);
            $basename = substr($reference, $pos + 1);
        } else {
            $namespace = null;
            $basename = $reference;
        }
        $substitute = null;
        $reference = Monkey::patched($namespace, $basename, false, $substitute);

        return $substitute ?: $reference;
    }
protected function _reference($reference)
    {
        if (!is_string($reference)) {
            return $reference;
        }

        $pos = strrpos($reference, '\\');
        if ($pos !== false) {
            $namespace = substr($reference, 0, $pos);
            $basename = substr($reference, $pos + 1);
        } else {
            $namespace = null;
            $basename = $reference;
        }
        $substitute = null;
        $reference = Monkey::patched($namespace, $basename, false, $substitute);

        return $substitute ?: $reference;
    }
protected function _reference ( $ reference ) { if ( ! is_string ( $ reference ) ) { return $ reference ; } $ pos = strrpos ( $ reference , '\\' ) ; if ( $ pos !== false ) { $ namespace = substr ( $ reference , 0 , $ pos ) ; $ basename = substr ( $ reference , $ pos + 1 ) ; } else { $ namespace = null ; $ basename = $ reference ; } $ substitute = null ; $ reference = Monkey :: patched ( $ namespace , $ basename , false , $ substitute ) ; return $ substitute ? : $ reference ; }
Return the actual reference which must be used.

@param mixed $reference An instance or a fully-namespaced class name.
@param mixed            The reference or the monkey patched one if exist.
Return the actual reference which must be used .