Skip to content

Commit 4a607ab

Browse files
committed
Add more platform default methods
1 parent 2c3cb2a commit 4a607ab

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Platform/Platform.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,9 @@ public function getTypeCoercers(Direction $direction): iterable
9999
{
100100
return $this->coercers;
101101
}
102+
103+
public function isFeatureSupported(GrammarFeature $feature): bool
104+
{
105+
return true;
106+
}
102107
}

src/Platform/StandardPlatform.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public function getName(): string
2828
return 'standard';
2929
}
3030

31+
#[\Override]
3132
public function getTypes(Direction $direction): iterable
3233
{
3334
yield from parent::getTypes($direction);
@@ -145,6 +146,7 @@ public function getTypes(Direction $direction): iterable
145146
}
146147
}
147148

149+
#[\Override]
148150
public function getTypeCoercers(Direction $direction): iterable
149151
{
150152
yield from parent::getTypeCoercers($direction);
@@ -170,6 +172,7 @@ public function getTypeCoercers(Direction $direction): iterable
170172
yield Type\StringLiteralType::class => $string;
171173
}
172174

175+
#[\Override]
173176
public function isFeatureSupported(GrammarFeature $feature): bool
174177
{
175178
return \in_array($feature, self::FEATURES_LIST, true);

0 commit comments

Comments
 (0)