classLiteralMask
final class LiteralMask
Replaces quoted and code literals with filler so their words are not read as clauses.
Double quotes, single quotes and backticks open a literal; an apostrophe after a letter or digit is part of a word. Every masked character becomes "x", so the length is kept.
Methods§
public function apply(string $text): stringMasks every literal in a statement.
Parameters
$text | string | The statement |
Returns
string The statement with literal characters replaced by "x"Throws
InvalidInputException When a literal is not closedTest cases 2
Called from 1
Calls 4
- function-call
strlenline 30 - function-call
ctype_alnumline 45 - function-call
in_arrayline 46 - new InvalidInputException line 54
Test cases 18§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 16
DefinitionReaderTestcallsLoaderTestcallsReferenceTestcallsMarkdownDocumentTestcallsApplicationTestcallsCommandHandlerTestcallsCommandLineTestcallsExecutorTestcallsFormatterTestcallsValidatorTestcallsItemTestcallsItemValidatorTestcallsAnalyzerTestcallsCoverageTestcallsSnapshotTestcallsVerifierTestcalls