original_string: protected function parseListLine($line)
      {
          $depth = 0;
          for ($i=0; $i<strlen($line); $i++) {
              $char = $line[$i];
  
              if ($char == ' ') {
                  $depth++;
              } else if ($char == "\t") {
                  $depth += 2;
              } else {
                  break;
              }
          }
  
          if (preg_match('/^((\*|\-)|([\d#]+)\.) (.+)$/', trim($line), $match)) {
              return array(
                  'prefix' => $line[$i],
                  'ordered' => ($line[$i] == '*' || $line[$i] == '-') ? false : true,
                  'depth' => $depth,
                  'text' => array($match[4])
              );
          }
  
          return false;
      }
code: protected function parseListLine($line)
      {
          $depth = 0;
          for ($i=0; $i<strlen($line); $i++) {
              $char = $line[$i];
  
              if ($char == ' ') {
                  $depth++;
              } else if ($char == "\t") {
                  $depth += 2;
              } else {
                  break;
              }
          }
  
          if (preg_match('/^((\*|\-)|([\d#]+)\.) (.+)$/', trim($line), $match)) {
              return array(
                  'prefix' => $line[$i],
                  'ordered' => ($line[$i] == '*' || $line[$i] == '-') ? false : true,
                  'depth' => $depth,
                  'text' => array($match[4])
              );
          }
  
          return false;
      }
code_tokens: protected function parseListLine ( $ line ) { $ depth = 0 ; for ( $ i = 0 ; $ i < strlen ( $ line ) ; $ i ++ ) { $ char = $ line [ $ i ] ; if ( $ char == ' ' ) { $ depth ++ ; } else if ( $ char == "\t" ) { $ depth += 2 ; } else { break ; } } if ( preg_match ( '/^((\*|\-)|([\d#]+)\.) (.+)$/' , trim ( $ line ) , $ match ) ) { return array ( 'prefix' => $ line [ $ i ] , 'ordered' => ( $ line [ $ i ] == '*' || $ line [ $ i ] == '-' ) ? false : true , 'depth' => $ depth , 'text' => array ( $ match [ 4 ] ) ) ; } return false ; }
docstring: Parses a list line
  
  @param string $line the string line
  @return array containing:
  - true if the list is ordered, false else
  - the depth of the list
  - the text of the first line without the tick
docstring_tokens: Parses a list line