code: private function isValidGlobalCommand(string $command): bool
      {
          $valid = false;
  
          if (strlen($command)) {
              // Check for command in path list
              foreach ($this->paths as $pathDir) {
                  $tmpPath = $pathDir . DIRECTORY_SEPARATOR . $command;
                  if ($this->isValidFullPath($tmpPath)) {
                      $valid = true;
                      break;
                  }
              }
          }
  
          return $valid;
      }
docs: Validate a global command by checking through system & provided paths.