src/Matcher/ToThrow.php
public static function expected($expected, $code = 0)
    {
        if ($expected === null || is_string($expected)) {
            return new AnyException($expected, $code);
        }
        return $expected;
    }
public static function expected($expected, $code = 0)
    {
        if ($expected === null || is_string($expected)) {
            return new AnyException($expected, $code);
        }
        return $expected;
    }
public static function expected ( $ expected , $ code = 0 ) { if ( $ expected === null || is_string ( $ expected ) ) { return new AnyException ( $ expected , $ code ) ; } return $ expected ; }
Normalise the expected value as an Exception.

@param  mixed   $expected The expected value to be normalized.
@param  integer $code     The expected `Exception` code if `$expected` is a string.
@return mixed             The normalised value.
Normalise the expected value as an Exception .