code: public function getScopes(): array
      {
          static $scopes;
  
          if (null === $scopes) {
              $scopes = [];
              $class = new ReflectionClass($this);
  
              foreach ($class->getConstants() as $constant => $value) {
                  if ('SCOPE_' === substr($constant, 0, 6)) {
                      $scopes[] = $value;
                  }
              }
          }
  
          return $scopes;
      }
docs: Get scopes
  
  @return array