mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Added Psalm\Codebase::isTypeContainedByType()
This commit is contained in:
parent
3fdef1a032
commit
e87f500458
@ -4,6 +4,7 @@ namespace Psalm;
|
||||
use LanguageServerProtocol\{Position, Range};
|
||||
use PhpParser;
|
||||
use Psalm\Internal\Analyzer\ProjectAnalyzer;
|
||||
use Psalm\Internal\Analyzer\TypeAnalyzer;
|
||||
use Psalm\Internal\Provider\ClassLikeStorageProvider;
|
||||
use Psalm\Internal\Provider\FileProvider;
|
||||
use Psalm\Internal\Provider\FileReferenceProvider;
|
||||
@ -1148,4 +1149,10 @@ class Codebase
|
||||
{
|
||||
$this->file_provider->removeTemporaryFileChanges($file_path);
|
||||
}
|
||||
public function isTypeContainedByType(
|
||||
Type\Union $input_type,
|
||||
Type\Union $container_type
|
||||
): bool {
|
||||
return TypeAnalyzer::isContainedBy($this, $input_type, $container_type);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user