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