original_string: public static function encode(String $string) : String
      {
          $secBadChars = Properties::$injectionBadChars;
  
          if( ! empty($secBadChars) )
          {
              foreach( $secBadChars as $badChar => $changeChar )
              {
                  if( is_numeric($badChar) )
                  {
                      $badChar = $changeChar;
                      $changeChar = '';
                  }
  
                  $badChar = trim($badChar, '/');
                  $string  = preg_replace('/'.$badChar.'/xi', $changeChar, $string);
              }
          }
  
          return addslashes(trim($string));
      }
code: public static function encode(String $string) : String
      {
          $secBadChars = Properties::$injectionBadChars;
  
          if( ! empty($secBadChars) )
          {
              foreach( $secBadChars as $badChar => $changeChar )
              {
                  if( is_numeric($badChar) )
                  {
                      $badChar = $changeChar;
                      $changeChar = '';
                  }
  
                  $badChar = trim($badChar, '/');
                  $string  = preg_replace('/'.$badChar.'/xi', $changeChar, $string);
              }
          }
  
          return addslashes(trim($string));
      }
code_tokens: public static function encode ( String $ string ) : String { $ secBadChars = Properties :: $ injectionBadChars ; if ( ! empty ( $ secBadChars ) ) { foreach ( $ secBadChars as $ badChar => $ changeChar ) { if ( is_numeric ( $ badChar ) ) { $ badChar = $ changeChar ; $ changeChar = '' ; } $ badChar = trim ( $ badChar , '/' ) ; $ string = preg_replace ( '/' . $ badChar . '/xi' , $ changeChar , $ string ) ; } } return addslashes ( trim ( $ string ) ) ; }
docstring: Encode Injection Chars
  
  @param string $string
  
  @return string
docstring_tokens: Encode Injection Chars