original_string: public function getStatus($pathspec = null, $_ = null)
      {
          $this->porcelain();
  
          $status = \call_user_func_array([$this, 'execute'], \func_get_args());
          $status = \explode("\n", $status);
  
          $files = [];
  
          foreach ($status as $line) {
              if (\trim($line)) {
                  $index    = \trim(\substr($line, 0, 1));
                  $worktree = \trim(\substr($line, 1, 1));
  
                  if ($index && $worktree) {
                      $file         = \trim(\substr($line, 2));
                      $files[$file] = [
                          'index'    => $index ?: false,
                          'worktree' => $worktree ?: false,
                      ];
                  }
              }
          }
  
          return $files;
      }
code: public function getStatus($pathspec = null, $_ = null)
      {
          $this->porcelain();
  
          $status = \call_user_func_array([$this, 'execute'], \func_get_args());
          $status = \explode("\n", $status);
  
          $files = [];
  
          foreach ($status as $line) {
              if (\trim($line)) {
                  $index    = \trim(\substr($line, 0, 1));
                  $worktree = \trim(\substr($line, 1, 1));
  
                  if ($index && $worktree) {
                      $file         = \trim(\substr($line, 2));
                      $files[$file] = [
                          'index'    => $index ?: false,
                          'worktree' => $worktree ?: false,
                      ];
                  }
              }
          }
  
          return $files;
      }
code_tokens: public function getStatus ( $ pathspec = null , $ _ = null ) { $ this -> porcelain ( ) ; $ status = \ call_user_func_array ( [ $ this , 'execute' ] , \ func_get_args ( ) ) ; $ status = \ explode ( "\n" , $ status ) ; $ files = [ ] ; foreach ( $ status as $ line ) { if ( \ trim ( $ line ) ) { $ index = \ trim ( \ substr ( $ line , 0 , 1 ) ) ; $ worktree = \ trim ( \ substr ( $ line , 1 , 1 ) ) ; if ( $ index && $ worktree ) { $ file = \ trim ( \ substr ( $ line , 2 ) ) ; $ files [ $ file ] = [ 'index' => $ index ? : false , 'worktree' => $ worktree ? : false , ] ; } } } return $ files ; }
docstring: Return the parsed index and work tree status.
  
  The result will be an associative array of all files and an status array in the following format:
  <code>
  array(
  '&lt;pathspec&gt;' => array(
  'index'    => [false | "M" | "A" | "D" | "R" | "C" | "U" | "?" | "!"],
  'worktree' => [false | "M" | "A" | "D" | "R" | "C" | "U" | "?" | "!"],
  )
  )
  </code>
  
  @param string $pathspec A path spec.
  
  @param string $_        Optional list of additional path specs.
  
  @return array
  
  @SuppressWarnings(PHPMD.ShortVariableName)
  @SuppressWarnings(PHPMD.UnusedFormalParameter)
  @SuppressWarnings(PHPMD.CamelCaseParameterName)
docstring_tokens: Return the parsed index and work tree status .