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

Given two types, checks if `$input_type` is a subtype of `$container_type`.
If you consider `Type\Union` as a set of types, this will tell you
if `$input_type` is fully contained in `$container_type`,

$input_type ⊆ $container_type

Useful for emitting issues like InvalidArgument, where argument at the call site
should be a subset of the function parameter type.
Checks if type is a subtype of other