original_string: public function setDeprecated($status = true, $template = null)
      {
          if (null !== $template) {
              if (preg_match('#[\r\n]|\*/#', $template)) {
                  throw new InvalidArgumentException('Invalid characters found in deprecation template.');
              }
  
              if (false === strpos($template, '%service_id%')) {
                  throw new InvalidArgumentException('The deprecation template must contain the "%service_id%" placeholder.');
              }
  
              $this->deprecationTemplate = $template;
          }
  
          $this->changes['deprecated'] = true;
  
          $this->deprecated = (bool) $status;
  
          return $this;
      }
code: public function setDeprecated($status = true, $template = null)
      {
          if (null !== $template) {
              if (preg_match('#[\r\n]|\*/#', $template)) {
                  throw new InvalidArgumentException('Invalid characters found in deprecation template.');
              }
  
              if (false === strpos($template, '%service_id%')) {
                  throw new InvalidArgumentException('The deprecation template must contain the "%service_id%" placeholder.');
              }
  
              $this->deprecationTemplate = $template;
          }
  
          $this->changes['deprecated'] = true;
  
          $this->deprecated = (bool) $status;
  
          return $this;
      }
code_tokens: public function setDeprecated ( $ status = true , $ template = null ) { if ( null !== $ template ) { if ( preg_match ( '#[\r\n]|\*/#' , $ template ) ) { throw new InvalidArgumentException ( 'Invalid characters found in deprecation template.' ) ; } if ( false === strpos ( $ template , '%service_id%' ) ) { throw new InvalidArgumentException ( 'The deprecation template must contain the "%service_id%" placeholder.' ) ; } $ this -> deprecationTemplate = $ template ; } $ this -> changes [ 'deprecated' ] = true ; $ this -> deprecated = ( bool ) $ status ; return $ this ; }
docstring: Whether this definition is deprecated, that means it should not be called
  anymore.
  
  @param bool   $status
  @param string $template Template message to use if the definition is deprecated
  
  @return $this
  
  @throws InvalidArgumentException when the message template is invalid
docstring_tokens: Whether this definition is deprecated that means it should not be called anymore .