code: protected function methodAllowed(): bool
      {
          $this->test = $this->rule->getMethods() === null ||
              \in_array($this->method, $this->rule->getMethods(), true);
  
          return $this->isTest();
      }
docs: check method
  
  @return bool