Skip to content

Commit b08e63a

Browse files
committed
Fix
1 parent e303360 commit b08e63a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Type/Accessory/AccessoryLiteralStringType.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace PHPStan\Type\Accessory;
44

55
use PHPStan\TrinaryLogic;
6+
use PHPStan\Type\BooleanType;
67
use PHPStan\Type\CompoundType;
78
use PHPStan\Type\CompoundTypeHelper;
89
use PHPStan\Type\Constant\ConstantArrayType;
@@ -17,7 +18,6 @@
1718
use PHPStan\Type\Traits\NonGenericTypeTrait;
1819
use PHPStan\Type\Traits\NonIterableTypeTrait;
1920
use PHPStan\Type\Traits\NonObjectTypeTrait;
20-
use PHPStan\Type\Traits\TruthyBooleanTypeTrait;
2121
use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
2222
use PHPStan\Type\Type;
2323
use PHPStan\Type\UnionType;
@@ -28,7 +28,6 @@ class AccessoryLiteralStringType implements CompoundType, AccessoryType
2828
use MaybeCallableTypeTrait;
2929
use NonObjectTypeTrait;
3030
use NonIterableTypeTrait;
31-
use TruthyBooleanTypeTrait;
3231
use UndecidedComparisonCompoundTypeTrait;
3332
use NonGenericTypeTrait;
3433

@@ -144,6 +143,11 @@ public function toString(): Type
144143
return $this;
145144
}
146145

146+
public function toBoolean(): BooleanType
147+
{
148+
return new BooleanType();
149+
}
150+
147151
public function toArray(): Type
148152
{
149153
return new ConstantArrayType(

0 commit comments

Comments
 (0)