public function getTypes() {
    // If type hint is set then that is the type of the parameter.
    if ($this->typeHint) {
      if ($this->typeHint instanceof TokenNode) {
        if ($this->typeHint->getType() === T_ARRAY) {
          $docTypes = $this->getDocTypes();
          foreach ($docTypes as $docType) {
            if ($docType !== 'array' && substr($docType, -2) !== '[]') {
              return [$this->typeHint->getText()];
            }
          }
          return $docTypes;
        }
        else {
          return [$this->typeHint->getText()];
        }
      }
      else {
        return [$this->typeHint->getAbsolutePath()];
      }
    }
    return $this->getDocTypes();
  }
public function getTypes() {
    // If type hint is set then that is the type of the parameter.
    if ($this->typeHint) {
      if ($this->typeHint instanceof TokenNode) {
        if ($this->typeHint->getType() === T_ARRAY) {
          $docTypes = $this->getDocTypes();
          foreach ($docTypes as $docType) {
            if ($docType !== 'array' && substr($docType, -2) !== '[]') {
              return [$this->typeHint->getText()];
            }
          }
          return $docTypes;
        }
        else {
          return [$this->typeHint->getText()];
        }
      }
      else {
        return [$this->typeHint->getAbsolutePath()];
      }
    }
    return $this->getDocTypes();
  }
public function getTypes ( ) { // If type hint is set then that is the type of the parameter. if ( $ this -> typeHint ) { if ( $ this -> typeHint instanceof TokenNode ) { if ( $ this -> typeHint -> getType ( ) === T_ARRAY ) { $ docTypes = $ this -> getDocTypes ( ) ; foreach ( $ docTypes as $ docType ) { if ( $ docType !== 'array' && substr ( $ docType , - 2 ) !== '[]' ) { return [ $ this -> typeHint -> getText ( ) ] ; } } return $ docTypes ; } else { return [ $ this -> typeHint -> getText ( ) ] ; } } else { return [ $ this -> typeHint -> getAbsolutePath ( ) ] ; } } return $ this -> getDocTypes ( ) ; }
Get the type of the parameter as defined by type hinting or doc comment.

@return string[]
The types as defined by phpdoc standard. Default is ['mixed'].
Get the type of the parameter as defined by type hinting or doc comment .