code: private function setQuery($query)
      {
          $query = ltrim($query, '?');
          $parameters = [];
          try {
              parse_str($query, $parameters);
              $this->query = $query;
          } catch (\Exception $e) {
              throw new \InvalidArgumentException('Invalid query', 0, $e);
          }
      }
docs: @param string $query
  
  @throws \InvalidArgumentException