original_string: protected function filterCsvInjection($input)
      {
          // Try to prevent csv injection
          $dangers = ['=', '+', '-', '@'];
          
          // Trim leading spaces for our test
          $trimmed = trim($input);
          
          if (strlen($trimmed)>1 && in_array($trimmed[0], $dangers)) {
              return "'" . $input;
          }  else {
              return $input;
          }
      }
code: protected function filterCsvInjection($input)
      {
          // Try to prevent csv injection
          $dangers = ['=', '+', '-', '@'];
          
          // Trim leading spaces for our test
          $trimmed = trim($input);
          
          if (strlen($trimmed)>1 && in_array($trimmed[0], $dangers)) {
              return "'" . $input;
          }  else {
              return $input;
          }
      }
code_tokens: protected function filterCsvInjection ( $ input ) { // Try to prevent csv injection $ dangers = [ '=' , '+' , '-' , '@' ] ; // Trim leading spaces for our test $ trimmed = trim ( $ input ) ; if ( strlen ( $ trimmed ) > 1 && in_array ( $ trimmed [ 0 ] , $ dangers ) ) { return "'" . $ input ; } else { return $ input ; } }
docstring: Single point for mitigating csv injection vulnerabilities
  
  https://www.owasp.org/index.php/CSV_Injection
  
  @param string $input
  @return string
docstring_tokens: Single point for mitigating csv injection vulnerabilities