code: public function check($role, $action = '*'): bool {
          if (is_array($role)) {
              foreach ($role as $r) {
                  if ($this->match($r, $action))
                      return true;
              }
  
              return false;
          }
  
          return $this->match($role, $action);
      }
docs: Check if a role (or one of roles) is allowed to an action.
  
  @param mixed $role single role or array of roles
  @param string $action
  @return bool