original_string: protected function listify($array, $polite = false)
      {
          if (empty($array)) {
              return 'None';
          }
          $ret = '';
          $i = count($array);
          foreach ($array as $value) {
              $i--;
              $ret .= $value;
              if ($i > 0 && !($polite && $i == 1)) {
                  $ret .= ', ';
              }
              if ($polite && $i == 1) {
                  $ret .= 'and ';
              }
          }
          return $ret;
      }
code: protected function listify($array, $polite = false)
      {
          if (empty($array)) {
              return 'None';
          }
          $ret = '';
          $i = count($array);
          foreach ($array as $value) {
              $i--;
              $ret .= $value;
              if ($i > 0 && !($polite && $i == 1)) {
                  $ret .= ', ';
              }
              if ($polite && $i == 1) {
                  $ret .= 'and ';
              }
          }
          return $ret;
      }
code_tokens: protected function listify ( $ array , $ polite = false ) { if ( empty ( $ array ) ) { return 'None' ; } $ ret = '' ; $ i = count ( $ array ) ; foreach ( $ array as $ value ) { $ i -- ; $ ret .= $ value ; if ( $ i > 0 && ! ( $ polite && $ i == 1 ) ) { $ ret .= ', ' ; } if ( $ polite && $ i == 1 ) { $ ret .= 'and ' ; } } return $ ret ; }
docstring: Takes a list of strings and turns them into a single list
  @param string[] $array List of strings
  @param bool $polite Bool whether or not to add an end before the last
  @return string
docstring_tokens: Takes a list of strings and turns them into a single list