original_string: private function getRootDirectory()
      {
          static $root;
  
          if (!$root) {
              $working = getcwd();
              $myself  = __DIR__;
  
              if (0 === strpos($myself, $working)) {
                  // Local installation, the working directory is the root
                  $root = $working;
              } else {
                  // Global installation, back up above the vendor/ directory
                  $root = realpath($myself . '/../../../../../');
              }
          }
  
          return $root;
      }
code: private function getRootDirectory()
      {
          static $root;
  
          if (!$root) {
              $working = getcwd();
              $myself  = __DIR__;
  
              if (0 === strpos($myself, $working)) {
                  // Local installation, the working directory is the root
                  $root = $working;
              } else {
                  // Global installation, back up above the vendor/ directory
                  $root = realpath($myself . '/../../../../../');
              }
          }
  
          return $root;
      }
code_tokens: private function getRootDirectory ( ) { static $ root ; if ( ! $ root ) { $ working = getcwd ( ) ; $ myself = __DIR__ ; if ( 0 === strpos ( $ myself , $ working ) ) { // Local installation, the working directory is the root $ root = $ working ; } else { // Global installation, back up above the vendor/ directory $ root = realpath ( $ myself . '/../../../../../' ) ; } } return $ root ; }
docstring: Get the root directory for a process command.
  
  @return string
docstring_tokens: Get the root directory for a process command .