public static function with(callable $callable, int $options = 0)
    {
        $enabled = self::hasXdebug();
        $inherited = self::isEnabled();

        if ($enabled && !$inherited) {
            xdebug_start_code_coverage($options);
        }

        $result = $callable();

        if ($enabled && !$inherited) {
            xdebug_stop_code_coverage(false);
        }

        return $result;
    }