/** * @return array */ public function supportsCurrentOS(Detector $detector = null) { if ($detector === null) { $detector = new Detector(); } return $detector->isUnixLike(); }
/** * @param Detector|null $detector * @return string * @throws \Exception */ public static function getProcessForCurrentOS(Detector $detector = null) { if ($detector === null) { $detector = new Detector(); } if ($detector->isUnixLike()) { return 'php ' . __DIR__ . DIRECTORY_SEPARATOR . 'child-process.php'; } if ($detector->isWindowsLike()) { return 'php.exe ' . __DIR__ . DIRECTORY_SEPARATOR . 'child-process.php'; } throw new \Exception('Unknown OS family'); }