code: public function getType()
      {
          if (is_string($this->type)) {
              $type = $this->type;
          } elseif (is_array($this->type)) {
              $type = reset($this->type);
          } else {
              $type = null;
          }
  
          return $this->isValidType($type) ? $type : self::ANY;
      }
docs: Returns the first configured type.
  
  @return string