Methods |
public
|
__construct(
array<int, ConstantIntegerType|ConstantStringType> $keyTypes,
array<int, Type> $valueTypes,
non-empty-list<int>|int $nextAutoIndexes = [0],
int[] $optionalKeys = [],
)
|
#
|
public
|
isEmpty(): bool
|
#
|
public
|
getNextAutoIndexes(): non-empty-list<int>
|
#
|
public
|
getNextAutoIndex(): int
|
#
|
public
|
getOptionalKeys(): int[]
|
#
|
public
|
getAllArrays(): self[]
|
#
|
public
|
getKeyTypes(): array<int, ConstantIntegerType|ConstantStringType>
|
#
|
public
|
getFirstKeyType(): Type
|
#
|
public
|
getLastKeyType(): Type
|
#
|
public
|
getValueTypes(): array<int, Type>
|
#
|
public
|
getFirstValueType(): Type
|
#
|
public
|
getLastValueType(): Type
|
#
|
public
|
isOptionalKey(int $i): bool
|
#
|
public
|
accepts(Type $type, bool $strictTypes): TrinaryLogic
|
#
|
public
|
isSuperTypeOf(Type $type): TrinaryLogic
|
#
|
public
|
equals(Type $type): bool
|
#
|
public
|
isCallable(): TrinaryLogic
|
#
|
public
|
getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope): ParametersAcceptor[]
|
#
|
public
|
findTypeAndMethodName(): ?ConstantArrayTypeAndMethod
Deprecated
Use findTypeAndMethodNames() instead
|
#
|
public
|
findTypeAndMethodNames(): ConstantArrayTypeAndMethod[]
|
#
|
public
|
hasOffsetValueType(Type $offsetType): TrinaryLogic
|
#
|
public
|
getOffsetValueType(Type $offsetType): Type
|
#
|
public
|
setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = true): Type
|
#
|
public
|
unsetOffset(Type $offsetType): Type
|
#
|
public
|
isIterableAtLeastOnce(): TrinaryLogic
|
#
|
public
|
removeLast(): self
|
#
|
public
|
removeFirst(): self
|
#
|
public
|
slice(int $offset, ?int $limit, bool $preserveKeys = false): self
|
#
|
public
|
reverse(bool $preserveKeys = false): self
|
#
|
public
|
chunk(positive-int $length, bool $preserveKeys = false): self
|
#
|
public
|
toBoolean(): BooleanType
|
#
|
public
|
toInteger(): Type
|
#
|
public
|
toFloat(): Type
|
#
|
public
|
generalize(GeneralizePrecision $precision): Type
|
#
|
public
|
generalizeValues(): self
|
#
|
public
|
generalizeToArray(): Type
|
#
|
public
|
getKeysArray(): self
|
#
|
public
|
getValuesArray(): self
|
#
|
public
|
count(): Type
|
#
|
public
|
describe(VerbosityLevel $level): string
|
#
|
public
|
inferTemplateTypes(Type $receivedType): TemplateTypeMap
Infers template types
Infers template types
Infers the real Type of the TemplateTypes found in $this, based on
the received Type.
Overrides
Implements
|
#
|
public
|
getReferencedTemplateTypes(TemplateTypeVariance $positionVariance): array
Returns the template types referenced by this Type, recursively
Returns the template types referenced by this Type, recursively
The return value is a list of TemplateTypeReferences, who contain the
referenced template type as well as the variance position in which it was
found.
For example, calling this on array<Foo<T>,Bar> (with T a template type)
will return one TemplateTypeReference for the type T.
Parameters
$positionVariance |
The variance position in
which the receiver type was
found.
|
Overrides
Implements
|
#
|
public
|
traverse(callable $cb): Type
Traverses inner types
Traverses inner types
Returns a new instance with all inner types mapped through $cb. Might
return the same instance if inner types did not change.
Overrides
Implements
|
#
|
public
|
isKeysSupersetOf(self $otherArray): bool
|
#
|
public
|
mergeWith(self $otherArray): self
|
#
|
public
|
makeOffsetRequired(Type $offsetType): self
|
#
|
public
static
|
__set_state(mixed[] $properties): Type
|
#
|