Copied!

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>
Abstract
Methods
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<int,\Type>
public has(int $index) : bool
 

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

Properties
private $token = NULL
 
  • var string
private $types = []
 
  • psalm-allow-private-mutation
  • var array<int,\Type>
Methods
private add(phpDocumentor\Reflection\Type $type) : void
 
  • psalm-suppress ImpureMethodCall
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration