Gush\Subscriber\GitRepoSubscriber::checkAdapterConfigured PHP Method

checkAdapterConfigured() private method

private checkAdapterConfigured ( string $adapter, string $typeLabel, string $supports, array &$errors )
$adapter string
$typeLabel string
$supports string
$errors array
    private function checkAdapterConfigured($adapter, $typeLabel, $supports, array &$errors)
    {
        $adapterFactory = $this->application->getAdapterFactory();
        if (!$adapterFactory->supports($adapter, $supports)) {
            $errors[] = sprintf('Adapter "%s" (for %s) is not supported, supported %2$s adapters are: "%3$s"', $adapter, $typeLabel, implode('", "', array_keys($adapterFactory->allOfType($supports))));
            return;
        }
        $config = $this->application->getConfig();
        if (!$config->has(['adapters', $adapter], Config::CONFIG_SYSTEM)) {
            $errors[] = sprintf('Adapter "%s" (for %s) is not configured yet.', $adapter, $typeLabel);
        }
    }