| 1: | <?php declare(strict_types = 1); |
| 2: | |
| 3: | namespace PHPStan\Type\Generic; |
| 4: | |
| 5: | use PHPStan\TrinaryLogic; |
| 6: | use PHPStan\Type\MixedType; |
| 7: | use PHPStan\Type\StrictMixedType; |
| 8: | use PHPStan\Type\Type; |
| 9: | |
| 10: | |
| 11: | final class TemplateStrictMixedType extends StrictMixedType implements TemplateType |
| 12: | { |
| 13: | |
| 14: | |
| 15: | use TemplateTypeTrait; |
| 16: | |
| 17: | public function __construct( |
| 18: | TemplateTypeScope $scope, |
| 19: | TemplateTypeStrategy $templateTypeStrategy, |
| 20: | TemplateTypeVariance $templateTypeVariance, |
| 21: | string $name, |
| 22: | StrictMixedType $bound, |
| 23: | ) |
| 24: | { |
| 25: | $this->scope = $scope; |
| 26: | $this->strategy = $templateTypeStrategy; |
| 27: | $this->variance = $templateTypeVariance; |
| 28: | $this->name = $name; |
| 29: | $this->bound = $bound; |
| 30: | } |
| 31: | |
| 32: | public function isSuperTypeOfMixed(MixedType $type): TrinaryLogic |
| 33: | { |
| 34: | return $this->isSuperTypeOf($type); |
| 35: | } |
| 36: | |
| 37: | public function isAcceptedBy(Type $acceptingType, bool $strictTypes): TrinaryLogic |
| 38: | { |
| 39: | return $this->isSubTypeOf($acceptingType); |
| 40: | } |
| 41: | |
| 42: | } |
| 43: | |