original_string: public function addResource(ResourceInterface $resource)
      {
          $key = (string) $resource;
  
          if (!isset($this->resources[$key])) {
              $this->resources[$key] = $resource;
          }
      }
code: public function addResource(ResourceInterface $resource)
      {
          $key = (string) $resource;
  
          if (!isset($this->resources[$key])) {
              $this->resources[$key] = $resource;
          }
      }
code_tokens: public function addResource ( ResourceInterface $ resource ) { $ key = ( string ) $ resource ; if ( ! isset ( $ this -> resources [ $ key ] ) ) { $ this -> resources [ $ key ] = $ resource ; } }
docstring: Adds a resource for this collection. If the resource already exists
  it is not added.
docstring_tokens: Adds a resource for this collection . If the resource already exists it is not added .