protected function hasAlreadyCrawled(Url $url) { foreach ($this->crawledUrls as $crawledUrl) { if ((string) $crawledUrl === (string) $url) { return true; } } return false; }