classSpelled
final class Spelled
uses Snapshot
Public API: explicitly declared with
@visibility public.How one token of a spelled region was written: the trivia before it and its own spelling.
The spelling is a choice among the equivalent spellings of the token the rendering produces at that position, such as the letter case of a keyword or the quoting of a name. It never adds or removes a token.
$token = new \SqlSemantics\Platform\MySql\Model\Statement\Spelling\Spelled(' ', 'and');
[$token->gap, $token->text] // => [' ', 'and']Properties§
public string $gappublic string $textMethods§
public function __construct(public string $gap, public string $text)Parameters
$gap | string | The whitespace and comments written before the token; empty for the first token of a region |
$text | string | The spelling of the token |
Calls 1
- static-call Check::input() line 32
Test cases 6§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Other tests reaching this symbol 6
ItemNamingTest::testNameAnswersTheAliasTheColumnNameOrTheTextcallsItemNamingTest::testNameRefusesALayoutOfAnItemThatNamesItselfcallsItemNamingTest::testNameRefusesALayoutThatSpellsTheCanonicalRenderingcallsItemNamingTest::testTextAnswersTheLayoutOrTheCanonicalRenderingcallsSelectExpressionTest::testALayoutWithTrailingTriviaIsRejectedcallsSelectExpressionTest::testAnAliasedItemWithALayoutIsRejectedcalls