original_string: protected function getChecksum($string)
      {
          $checksum = '';
          foreach (str_split(strrev($string)) as $i => $d) {
              $checksum .= ($i % 2 === 0) ? ($d * 2) : $d;
          }
          return (10 - array_sum(str_split($checksum)) % 10) % 10;
      }
code: protected function getChecksum($string)
      {
          $checksum = '';
          foreach (str_split(strrev($string)) as $i => $d) {
              $checksum .= ($i % 2 === 0) ? ($d * 2) : $d;
          }
          return (10 - array_sum(str_split($checksum)) % 10) % 10;
      }
code_tokens: protected function getChecksum ( $ string ) { $ checksum = '' ; foreach ( str_split ( strrev ( $ string ) ) as $ i => $ d ) { $ checksum .= ( $ i % 2 === 0 ) ? ( $ d * 2 ) : $ d ; } return ( 10 - array_sum ( str_split ( $ checksum ) ) % 10 ) % 10 ; }
docstring: Return the checksum char of luhn algorithm
  
  @param string $string
  @return string
docstring_tokens: Return the checksum char of luhn algorithm