protected function visit_plugins(RequestInterface $request, $value, $flags) { if (!is_array($value)) { throw new InvalidArgumentException('plugins value must be an array'); } foreach ($value as $plugin) { $request->addSubscriber($plugin); } }
protected function visit_debug(RequestInterface $request, $value, $flags) { if (class_exists('Guzzle\\Plugin\\Log\\LogPlugin')) { $request->addSubscriber(LogPlugin::getDebugPlugin()); } else { // @codeCoverageIgnoreStart $request->getCurlOptions()->set(CURLOPT_VERBOSE, true); // @codeCoverageIgnoreEnd } }