A PHP parser written in PHP
This report summarizes scanner evidence for nikic/PHP-Parser, a PHP project with 17,465 GitHub stars. SynthScan examined 36,063 lines of code across 355 source files, recording 95 pattern matches distributed across 2 syntactic categories. The legacy adjusted pattern signal is 2.8 (Low 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.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 95 finding(s).
Are imports declared and package/API names verified? 0 finding(s).
Are wrappers, guards, and repeated structures necessary? 92 finding(s).
Which changes need focused human review? 95 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
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 95 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 | test/PhpParser/BuilderFactoryTest.php | 252 | public function testInvalidIdentifierOrExpr(): void { | CODE |
| LOW | test/PhpParser/BuilderHelpersTest.php | 39 | public function testNormalizeStmtInvalidType(): void { | CODE |
| LOW | test/PhpParser/BuilderHelpersTest.php | 55 | public function testNormalizeIdentifierOrExpr(): void { | CODE |
| LOW | test/PhpParser/BuilderHelpersTest.php | 86 | public function testNormalizeNameInvalidType(): void { | CODE |
| LOW | test/PhpParser/BuilderHelpersTest.php | 113 | public function testNormalizeNameOrExpInvalidType(): void { | CODE |
| LOW⚡ | test/PhpParser/BuilderHelpersTest.php | 160 | public function testNormalizeTypeNullableVoid(): void { | CODE |
| LOW⚡ | test/PhpParser/BuilderHelpersTest.php | 166 | public function testNormalizeTypeNullableMixed(): void { | CODE |
| LOW⚡ | test/PhpParser/BuilderHelpersTest.php | 172 | public function testNormalizeTypeNullableNever(): void { | CODE |
| LOW | test/PhpParser/NodeTraverserTest.php | 215 | public function testDontTraverseCurrentAndChildren(): void { | CODE |
| LOW | test/PhpParser/ConstExprEvaluatorTest.php | 89 | public function testUnpackingNonArrayFails(): void { | CODE |
| LOW | test/PhpParser/ConstExprEvaluatorTest.php | 97 | public function testEvaluateFallbackMagicConst(): void { | CODE |
| LOW | test/PhpParser/ConstExprEvaluatorTest.php | 111 | public function testEvaluateFallbackPipeOperator(): void { | CODE |
| LOW | test/PhpParser/ConstExprEvaluatorTest.php | 145 | public static function provideTestEvaluateSilently() { | CODE |
| LOW⚡ | test/PhpParser/ParserTestAbstract.php | 14 | public function testParserThrowsSyntaxError(): void { | CODE |
| LOW⚡ | test/PhpParser/ParserTestAbstract.php | 21 | public function testParserThrowsSpecialError(): void { | CODE |
| LOW⚡ | test/PhpParser/ParserTestAbstract.php | 28 | public function testParserThrowsLexerError(): void { | CODE |
| LOW | test/PhpParser/ParserTestAbstract.php | 131 | public static function provideTestExtraAttributes() { | CODE |
| LOW | test/PhpParser/PrettyPrinterTest.php | 55 | public static function provideTestPrettyPrintFile() { | CODE |
| LOW | test/PhpParser/PrettyPrinterTest.php | 73 | public function testCommentBeforeInlineHTML(): void { | CODE |
| LOW | test/PhpParser/PrettyPrinterTest.php | 99 | public static function provideTestKindAttributes() { | CODE |
| LOW | test/PhpParser/PrettyPrinterTest.php | 155 | public static function provideTestUnnaturalLiterals() { | CODE |
| LOW | test/PhpParser/PrettyPrinterTest.php | 175 | public static function provideTestCustomRawValue() { | CODE |
| LOW | test/PhpParser/PrettyPrinterTest.php | 200 | public function testPrettyPrintWithErrorInClassConstFetch(): void { | CODE |
| LOW | test/PhpParser/PrettyPrinterTest.php | 213 | public function testFormatPreservingPrint($name, $code, $modification, $expected, $modeLine): void { | CODE |
| LOW | test/PhpParser/PrettyPrinterTest.php | 239 | public static function provideTestFormatPreservingPrint() { | CODE |
| LOW | test/PhpParser/PrettyPrinterTest.php | 270 | public static function provideTestRoundTripPrint() { | CODE |
| LOW | test/PhpParser/NameContextTest.php | 35 | public static function provideTestGetPossibleNames() { | CODE |
| LOW | …st/PhpParser/NodeVisitor/NodeConnectingVisitorTest.php | 13 | public function testConnectsNodeToItsParentNodeAndItsSiblingNodes(): void { | CODE |
| LOW | …/PhpParser/NodeVisitor/ParentConnectingVisitorTest.php | 11 | public function testConnectsChildNodeToParentNode(): void { | CODE |
| LOW | test/PhpParser/NodeVisitor/NameResolverTest.php | 378 | public function testAddDeclarationNamespacedName(): void { | CODE |
| LOW | test/PhpParser/NodeVisitor/NameResolverTest.php | 413 | public function testAddRuntimeResolvedNamespacedName(): void { | CODE |
| LOW | test/PhpParser/NodeVisitor/NameResolverTest.php | 490 | public function testClassNameIsCaseInsensitive(): void { | CODE |
| LOW | test/PhpParser/NodeVisitor/NameResolverTest.php | 511 | public function testSpecialClassNamesAreCaseInsensitive(): void { | CODE |
| LOW | test/PhpParser/Lexer/EmulativeTest.php | 35 | public function testReplaceKeywordsUppercase(string $keyword, int $expectedToken): void { | CODE |
| LOW | test/PhpParser/Lexer/EmulativeTest.php | 49 | public function testNoReplaceKeywordsAfterObjectOperator(string $keyword): void { | CODE |
| LOW | test/PhpParser/Lexer/EmulativeTest.php | 64 | public function testNoReplaceKeywordsAfterObjectOperatorWithSpaces(string $keyword): void { | CODE |
| LOW | test/PhpParser/Lexer/EmulativeTest.php | 77 | public function testNoReplaceKeywordsAfterObjectOperatorWithComment(): void { | CODE |
| LOW | test/PhpParser/Lexer/EmulativeTest.php | 96 | public function testNoReplaceKeywordsAfterNullsafeObjectOperator(string $keyword): void { | CODE |
| LOW | test/PhpParser/Lexer/EmulativeTest.php | 108 | public static function provideTestReplaceKeywords() { | CODE |
| LOW | test/PhpParser/Lexer/EmulativeTest.php | 159 | public function testLeaveStuffAloneInStrings(string $code): void { | CODE |
| LOW | test/PhpParser/Lexer/EmulativeTest.php | 195 | public static function provideTestLexNewFeatures() { | CODE |
| LOW | test/PhpParser/Internal/DifferTest.php | 60 | public static function provideTestDiffWithReplacements() { | CODE |
| LOW | test/PhpParser/Node/ParamTest.php | 55 | public function testPromotedPropertyWithoutVisibilityModifier(): void { | CODE |
| LOW | test/PhpParser/Node/ParamTest.php | 64 | public function testNonPromotedPropertyIsNotPublic(): void { | CODE |
| LOW | test/PhpParser/Node/PropertyHookTest.php | 54 | public function testGetStmtsSetHookFromParser(): void { | CODE |
| LOW | test/PhpParser/Node/PropertyHookTest.php | 82 | public function testGetStmtsSetHookWithoutPropertyName(): void { | CODE |
| LOW | test/PhpParser/Node/NameTest.php | 77 | public function testSliceLengthTooLargeWithOffset(): void { | CODE |
| LOW | test/PhpParser/Node/NameTest.php | 155 | public static function provideTestIsSpecialClassName() { | CODE |
| LOW | test/PhpParser/Node/IdentifierTest.php | 25 | public static function provideTestIsSpecialClassName() { | CODE |
| LOW | test/PhpParser/Node/Stmt/PropertyTest.php | 33 | public function testStaticImplicitlyPublic(): void { | CODE |
| LOW⚡ | test/PhpParser/Node/Expr/CallableLikeTest.php | 33 | public function testIsPartialFunctionApplication(CallLike $node, bool $isPartialFunctionApplication): void { | CODE |
| LOW⚡ | test/PhpParser/Node/Expr/CallableLikeTest.php | 43 | public function testGetArgWithPlaceholders(CallLike $node, ?Arg $expected): void { | CODE |
| LOW⚡ | test/PhpParser/Node/Expr/CallableLikeTest.php | 47 | public static function provideTestIsFirstClassCallable() { | CODE |
| LOW | test/PhpParser/Node/Expr/CallableLikeTest.php | 65 | public static function provideTestIsPartialFunctionApplication() { | CODE |
| LOW | test/PhpParser/Node/Expr/CallableLikeTest.php | 88 | public static function provideTestGetArgWithPlaceholders() { | CODE |
| LOW | test/PhpParser/Node/Scalar/StringTest.php | 45 | public static function provideTestParseEscapeSequences() { | CODE |
| LOW | test/PhpParser/Builder/FunctionTest.php | 115 | public function testInvalidNullableVoidType(): void { | CODE |
| LOW | test/PhpParser/Builder/MethodTest.php | 156 | public function testAddStmtToAbstractMethodError(): void { | CODE |
| LOW | test/PhpParser/Builder/MethodTest.php | 165 | public function testMakeMethodWithStmtsAbstractError(): void { | CODE |
| LOW | test/PhpParser/Builder/TraitUseTest.php | 44 | public function testInvalidAdaptationNode(): void { | CODE |
| 32 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lib/PhpParser/Comment.php | 121 | $text = str_replace("\r\n", "\n", $this->text); | COMMENT |
| LOW | lib/PhpParser/Comment.php | 141 | // /* | COMMENT |
| LOW | lib/PhpParser/PrettyPrinterAbstract.php | 1721 | COMMENT |