1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Type;
4:
5: /** @api */
6: class NonAcceptingNeverType extends NeverType
7: {
8:
9: /** @api */
10: public function __construct()
11: {
12: parent::__construct(true);
13: }
14:
15: public function isSuperTypeOf(Type $type): IsSuperTypeOfResult
16: {
17: if ($type instanceof self) {
18: return IsSuperTypeOfResult::createYes();
19: }
20: if ($type instanceof parent) {
21: return IsSuperTypeOfResult::createMaybe();
22: }
23:
24: return IsSuperTypeOfResult::createNo();
25: }
26:
27: public function accepts(Type $type, bool $strictTypes): AcceptsResult
28: {
29: if ($type instanceof NeverType) {
30: return AcceptsResult::createYes();
31: }
32:
33: return AcceptsResult::createNo();
34: }
35:
36: public function describe(VerbosityLevel $level): string
37: {
38: return 'never';
39: }
40:
41: }
42: