new WindowsBuilder( // binary_sdk_dir: $input->getOption('with-sdk-binary-dir'), // vs_ver: $input->getOption('vs-ver'), // arch: $input->getOption('arch'), // ), 'Darwin' => new MacOSBuilder($input->getOptions()), 'Linux' => new LinuxBuilder($input->getOptions()), 'BSD' => new BSDBuilder($input->getOptions()), default => throw new WrongUsageException('Current OS "' . PHP_OS_FAMILY . '" is not supported yet'), }; return self::$builder; } /** * @throws WrongUsageException */ public function getBuilder(): BuilderBase { if (self::$builder === null) { throw new WrongUsageException('Builder has not been initialized'); } return self::$builder; } }