Represents an array type as described in the PSR-5, the PHPDoc Standard.

An array can be represented in two forms:

  1. Untyped (array), where the key and value type is unknown and hence classified as 'Mixed_'.
  2. Types (string[]), where the value type is provided by preceding an opening and closing square bracket with a
    type name.
  • psalm-immutable
public phpDocumentor\Reflection\Types\AbstractList::__construct(?phpDocumentor\Reflection\Type $valueType = NULL, ?phpDocumentor\Reflection\Type $keyType = NULL)

Initializes this representation of an array with the given Type.

public phpDocumentor\Reflection\Types\AbstractList::__toString() : string

Returns a rendered output of the Type as it would be used in a DocBlock.

public phpDocumentor\Reflection\Types\AbstractList::getKeyType() : phpDocumentor\Reflection\Type

Returns the type for the keys of this array.

public phpDocumentor\Reflection\Types\AbstractList::getValueType() : phpDocumentor\Reflection\Type

Returns the value for the keys of this array.

protected phpDocumentor\Reflection\Types\AbstractList::$defaultKeyType
  • var Type
protected phpDocumentor\Reflection\Types\AbstractList::$keyType
  • var Type|null
protected phpDocumentor\Reflection\Types\AbstractList::$valueType
  • var Type
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only