Menu

## List_ extends Array_
in package
implements PseudoType

List_.php : 27

Value Object representing the type 'list'.

##### Tags

psalm-immutable

### Interfaces, Classes and Traits

PseudoType

### Table of Contents

$defaultKeyType : Type
$keyType : Type|null
$valueType : Type
__construct() : mixed
__toString() : string
  Returns a rendered output of the Type as it would be used in a DocBlock.
getKeyType() : Type
  Returns the type for the keys of this array.
getValueType() : Type
  Returns the value for the keys of this array.
underlyingType() : Type

### Properties

#### $defaultKeyType

AbstractList.php : 32
`protected Type $defaultKeyType`

#### $keyType

AbstractList.php : 29
`protected Type|null $keyType`

#### $valueType

AbstractList.php : 26
`protected Type $valueType`

### Methods

#### __construct()

List_.php : 34
`public __construct([Type|null $valueType = null ]) : mixed`

##### Parameters

$valueType : Type|null = null

##### Return values

mixed —

#### __toString()

List_.php : 42

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

`public __toString() : string`

##### Return values

string —

#### getKeyType()

AbstractList.php : 51

Returns the type for the keys of this array.

`public getKeyType() : Type`

##### Return values

Type —

#### getValueType()

AbstractList.php : 59

Returns the value for the keys of this array.

`public getValueType() : Type`

##### Return values

Type —

#### underlyingType()

List_.php : 29
`public underlyingType() : Type`

##### Return values

Type —

## Search results