public static function getInvalidArgumentException($argument, $type)
    {
        $stack = debug_backtrace(false);

        return new InvalidArgumentException(
          sprintf(
            'Argument #%d of %s::%s() is no %s',
            $argument,
            $stack[1]['class'],
            $stack[1]['function'],
            $type
          )
        );
    }