original_string: public function hasEndpoint($uri)
      {
          /** @var ArrayCollection $urlsFound */
          $urlsFound = $this->getEndpoints()->filter(function (Endpoint $endpoint) use ($uri) {
              // return when URI and URI string are equal
              return (string) $endpoint->getUri() === $uri;
          });
  
          return $urlsFound->isEmpty() === false;
      }
code: public function hasEndpoint($uri)
      {
          /** @var ArrayCollection $urlsFound */
          $urlsFound = $this->getEndpoints()->filter(function (Endpoint $endpoint) use ($uri) {
              // return when URI and URI string are equal
              return (string) $endpoint->getUri() === $uri;
          });
  
          return $urlsFound->isEmpty() === false;
      }
code_tokens: public function hasEndpoint ( $ uri ) { /** @var ArrayCollection $urlsFound */ $ urlsFound = $ this -> getEndpoints ( ) -> filter ( function ( Endpoint $ endpoint ) use ( $ uri ) { // return when URI and URI string are equal return ( string ) $ endpoint -> getUri ( ) === $ uri ; } ) ; return $ urlsFound -> isEmpty ( ) === false ; }
docstring: Checks if the given uri is already added to collection.
  
  @param string $uri
  
  @return bool
docstring_tokens: Checks if the given uri is already added to collection .