original_string: protected function addHelpResource($key, $resource)
      {
          if (isset($this->helpResources[$key])) {
              throw new \LogicException('The resource you are trying to add is already set.');
          }
  
          if (false === is_object(($resource))) {
              throw new \InvalidArgumentException(sprintf('The resource "%s" you are trying to add is not an object. addHelpResource() accepts only objects. Use addHelpValue() to store other kind of values.', $key));
          }
  
          $this->helpResources[$key] = $resource;
  
          return $this;
      }
code: protected function addHelpResource($key, $resource)
      {
          if (isset($this->helpResources[$key])) {
              throw new \LogicException('The resource you are trying to add is already set.');
          }
  
          if (false === is_object(($resource))) {
              throw new \InvalidArgumentException(sprintf('The resource "%s" you are trying to add is not an object. addHelpResource() accepts only objects. Use addHelpValue() to store other kind of values.', $key));
          }
  
          $this->helpResources[$key] = $resource;
  
          return $this;
      }
code_tokens: protected function addHelpResource ( $ key , $ resource ) { if ( isset ( $ this -> helpResources [ $ key ] ) ) { throw new \ LogicException ( 'The resource you are trying to add is already set.' ) ; } if ( false === is_object ( ( $ resource ) ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The resource "%s" you are trying to add is not an object. addHelpResource() accepts only objects. Use addHelpValue() to store other kind of values.' , $ key ) ) ; } $ this -> helpResources [ $ key ] = $ resource ; return $ this ; }
docstring: Add a resource to help during the test of the class.
  
  @param string $key      The name of the resource
  @param mixed  $resource The resource
  
  @return $this
docstring_tokens: Add a resource to help during the test of the class .