Base class for aggregated types like Compound and Intersection

A Aggregated Type is not so much a special keyword or object reference but is a series of Types that are separated
using separator.

  • psalm-immutable
  • template-implements IteratorAggregate<int, Type>
public __construct ( array $types , string $token )
  • param Type [] $types
public __toString () : string

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

public contains ( phpDocumentor\Reflection\Type $type ) : bool

Tests if this compound type contains the given type.

public get ( int $index ) : ? phpDocumentor\Reflection\Type

Returns the type at the given index.

public getIterator () : ArrayIterator
  • return ArrayIterator
public has ( int $index ) : bool

Tests if this compound type has a type with the given index.

private $token
  • var string
private $types
  • psalm-allow-private-mutation
  • var array
private add ( phpDocumentor\Reflection\Type $type ) : void
  • psalm-suppress ImpureMethodCall
© 2022 Bruce Wells
Search Namespaces \ Classes