src/Psalm/Codebase.php
public function canTypeBeContainedByType(
        Type\Union $input_type,
        Type\Union $container_type
    ): bool {
        return TypeAnalyzer::canBeContainedBy($this, $input_type, $container_type);
    }
public function canTypeBeContainedByType(
        Type\Union $input_type,
        Type\Union $container_type
    ): bool {
        return TypeAnalyzer::canBeContainedBy($this, $input_type, $container_type);
    }
public function canTypeBeContainedByType ( Type \ Union $ input_type , Type \ Union $ container_type ) : bool { return TypeAnalyzer :: canBeContainedBy ( $ this , $ input_type , $ container_type ) ; }
Checks if type has any part that is a subtype of other

Given two types, checks if *any part* of `$input_type` is a subtype of `$container_type`.
If you consider `Type\Union` as a set of types, this will tell you if intersection
of `$input_type` with `$container_type` is not empty.

$input_type ∩ $container_type ≠ ∅ , e.g. they are not disjoint.

Useful for emitting issues like PossiblyInvalidArgument, where argument at the call
site should be a subtype of the function parameter type, but it's has some types that are
not a subtype of the required type.
Checks if type has any part that is a subtype of other