public static function invalidEntityType($expected, $actual)
    {
        return new self(sprintf(
            'Entity must be an instance of "%s"; got "%s".',
            $expected,
            is_object($actual) ? get_class($actual) : gettype($actual)
        ));
    }
public static function invalidEntityType($expected, $actual)
    {
        return new self(sprintf(
            'Entity must be an instance of "%s"; got "%s".',
            $expected,
            is_object($actual) ? get_class($actual) : gettype($actual)
        ));
    }
public static function invalidEntityType ( $ expected , $ actual ) { return new self ( sprintf ( 'Entity must be an instance of "%s"; got "%s".' , $ expected , is_object ( $ actual ) ? get_class ( $ actual ) : gettype ( $ actual ) ) ) ; }
'Entity must be an instance of "%s"; got "%s".'

@param  string $expected
@param  object $actual

@return InvalidArgumentException
Entity must be an instance of %s ; got %s .