code: public static function setupCliServerEnv()
      {
          $parseUrl = parse_url(substr($_SERVER["REQUEST_URI"], 1));
          $route = isset($parseUrl['path']) ? $parseUrl['path']:null;
          if (is_file(__DIR__ . '/' . $route)) {
              if (substr($route, -4) == ".php") {
                  require __DIR__ . '/' . $route;     // Include requested script files
                  exit;
              }
              return false;           // Serve file as is
          } else {                    // Fallback to index.php
              $_GET["q"] = $route;    // Try to emulate the behaviour of a .htaccess here.
          }
          return true;
      }
docs: Setup php server
  @return bool
  @codeCoverageIgnore