['pipe', 'w'], 2 => ['pipe', 'w']], $pipes); $stdout = \stream_get_contents($pipes[1]); $stderr = \stream_get_contents($pipes[2]); foreach ($pipes as $pipe) { \fclose($pipe); } return $resource !== false && \proc_close($resource) !== 127; } /** * Get git binary. * * @return string * * @since 1.0.0 */ public static function getBin() : string { return self::$bin; } /** * Set git binary. * * @param string $path Git path * * @return void * * @throws PathException This exception is thrown if the binary path doesn't exist * * @since 1.0.0 */ public static function setBin(string $path) : void { if (\realpath($path) === false) { throw new PathException($path); } self::$bin = \realpath($path); } }