/** * Renders the output of the result of executing some urls given a client * instance * * If all urls are executed as expected, then the result of the operation * will be 0. Otherwise, the result will be 1. * * @param UrlChain $urlChain Url chain * @param RendererInterface $renderer Renderer * @param OutputInterface $output Output * * @return int Result of the execution */ public function execute(UrlChain $urlChain, RendererInterface $renderer, OutputInterface $output) { $result = 0; foreach ($urlChain->getUrls() as $url) { $result = $result | $this->executeUrl($this->client, $url, $renderer, $output); } return $result; }