src/Gitonomy/Git/Admin.php
private static function getProcess($command, array $args = array(), array $options = array())
    {
        $is_windows = defined('PHP_WINDOWS_VERSION_BUILD');
        $options = array_merge(array(
            'environment_variables' => $is_windows ? array('PATH' => getenv('PATH')) : array(),
            'command' => 'git',
            'process_timeout' => 3600,
        ), $options);

        $commandline = array_merge(array($options['command'], $command), $args);

        // Backward compatible layer for Symfony Process < 4.0.
        if (class_exists('Symfony\Component\Process\ProcessBuilder')) {
            $commandline = implode(' ', array_map(
                'Symfony\Component\Process\ProcessUtils::escapeArgument',
                $commandline
            ));
        }

        $process = new Process($commandline);
        $process->setEnv($options['environment_variables']);
        $process->setTimeout($options['process_timeout']);
        $process->setIdleTimeout($options['process_timeout']);

        return $process;
    }
private static function getProcess($command, array $args = array(), array $options = array())
    {
        $is_windows = defined('PHP_WINDOWS_VERSION_BUILD');
        $options = array_merge(array(
            'environment_variables' => $is_windows ? array('PATH' => getenv('PATH')) : array(),
            'command' => 'git',
            'process_timeout' => 3600,
        ), $options);

        $commandline = array_merge(array($options['command'], $command), $args);

        // Backward compatible layer for Symfony Process < 4.0.
        if (class_exists('Symfony\Component\Process\ProcessBuilder')) {
            $commandline = implode(' ', array_map(
                'Symfony\Component\Process\ProcessUtils::escapeArgument',
                $commandline
            ));
        }

        $process = new Process($commandline);
        $process->setEnv($options['environment_variables']);
        $process->setTimeout($options['process_timeout']);
        $process->setIdleTimeout($options['process_timeout']);

        return $process;
    }
This internal method is used to create a process object.