Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
This report summarizes scanner evidence for doctrine/lexer, a PHP project with 11,143 GitHub stars. SynthScan examined 1,296 lines of code across 21 source files, recording 10 pattern matches distributed across 2 syntactic categories. The legacy adjusted pattern signal is 7.7 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 9 finding(s).
Are imports declared and package/API names verified? 1 finding(s).
Are wrappers, guards, and repeated structures necessary? 9 finding(s).
Which changes need focused human review? 10 finding(s).
Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 10 distinct pattern matches across 2 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/AbstractLexerTest.php | 96 | public function testResetPositionByTokenPosition(): void | CODE |
| LOW | tests/AbstractLexerTest.php | 122 | public function testResetPositionPastTheLastToken(): void | CODE |
| LOW | tests/AbstractLexerTest.php | 219 | public static function inputUntilPositionDataProvider(): array | CODE |
| LOW | tests/AbstractLexerTest.php | 227 | public function testGetInputUntilPosition( | CODE |
| LOW | tests/AbstractLexerTest.php | 278 | public function testGetLiteralWithEnumLexer(): void | CODE |
| LOW | tests/AbstractLexerTest.php | 297 | public function testAddCatchablePatternsToMutableLexer(): void | CODE |
| LOW | tests/AbstractLexerTest.php | 316 | public function testMarkerAnnotationLocaleTr(): void | CODE |
| LOW | tests/AbstractLexerTest.php | 337 | public function testCanTokenizeFloatValue(): void | CODE |
| LOW | src/AbstractLexer.php | 132 | private function findTokenIndexAtOrAfterOffset(int $offset): int | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/AbstractLexerTest.php | 275 | $this->assertSame('fake_token', $this->concreteLexer->getLiteral('fake_token')); | CODE |