original_string: public function injectLine($contents, $lineToAdd)
      {
          if (strpos($contents, self::PLACEHOLDER) === false) {
              throw new \RuntimeException('Failed to find placeholder in config file, file might be malformed');
          }
  
          return str_replace(self::PLACEHOLDER, $lineToAdd."\n".self::PLACEHOLDER, $contents);
      }
code: public function injectLine($contents, $lineToAdd)
      {
          if (strpos($contents, self::PLACEHOLDER) === false) {
              throw new \RuntimeException('Failed to find placeholder in config file, file might be malformed');
          }
  
          return str_replace(self::PLACEHOLDER, $lineToAdd."\n".self::PLACEHOLDER, $contents);
      }
code_tokens: public function injectLine ( $ contents , $ lineToAdd ) { if ( strpos ( $ contents , self :: PLACEHOLDER ) === false ) { throw new \ RuntimeException ( 'Failed to find placeholder in config file, file might be malformed' ) ; } return str_replace ( self :: PLACEHOLDER , $ lineToAdd . "\n" . self :: PLACEHOLDER , $ contents ) ; }
docstring: Adds a line of PHP code into the config file.
  
  @param string $contents  The config file contents
  @param string $lineToAdd The line to inject
  
  @return string
docstring_tokens: Adds a line of PHP code into the config file .