Diff implementation
This report summarizes scanner evidence for sebastianbergmann/diff, a PHP project with 7,645 GitHub stars. SynthScan examined 6,469 lines of code across 44 source files, recording 62 pattern matches distributed across 1 syntactic category. The legacy adjusted pattern signal is 9.6 (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? 62 finding(s).
Are imports declared and package/API names verified? 0 finding(s).
Are wrappers, guards, and repeated structures necessary? 62 finding(s).
Which changes need focused human review? 62 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 62 distinct pattern matches across 1 syntactic category. 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 | README.md | 119 | [content:SebastianBergmann\Diff\Line:private] => public function tes | CODE |
| LOW | README.md | 125 | [content:SebastianBergmann\Diff\Line:private] => public function tes | CODE |
| LOW | tests/MyersDiffTest.php | 64 | public function testCompletelyDistinctSequences(): void | CODE |
| LOW | tests/MyersDiffTest.php | 81 | public function testSingleSubstitutionInMiddle(): void | CODE |
| LOW | tests/MyersDiffTest.php | 145 | public function testReversedSequenceProducesOptimalEditDistance(): void | CODE |
| LOW | tests/DiffTest.php | 22 | public function testGettersAfterConstructionWithDefault(): void | CODE |
| LOW | tests/DiffTest.php | 33 | public function testGettersAfterConstructionWithChunks(): void | CODE |
| LOW | tests/DiffTest.php | 46 | public function testSetChunksAfterConstruction(): void | CODE |
| LOW | tests/ParserTest.php | 82 | public function testParseWithMultipleChunks(): void | CODE |
| LOW | tests/ParserTest.php | 107 | public function testParseWithSpacesInFileNames(): void | CODE |
| LOW | tests/ParserTest.php | 129 | public function testParseWithSpacesInFileNamesAndTimestamp(): void | CODE |
| LOW | tests/ParserTest.php | 150 | public function testParseWithRemovedLines(): void | CODE |
| LOW | tests/ParserTest.php | 190 | public function testParseDiffForMultipleFiles(): void | CODE |
| LOW | tests/ParserTest.php | 223 | public function testParseDoesNotMistakeContentLinesForHeaderLines(): void | CODE |
| LOW | tests/ParserTest.php | 274 | public function testParseContinuesWithNextFileAfterChunkWithFewerLinesThanAnnounced(): void | CODE |
| LOW | tests/DifferTest.php | 275 | public static function provideSplitStringByLinesCases(): array | CODE |
| LOW | tests/DifferTest.php | 359 | public function testArrayRepresentationOfDiffCanBeRendered(array $expected, array|string $from, array|string $to): v | CODE |
| LOW | tests/DifferTest.php | 365 | public function testTextRepresentationOfDiffCanBeRendered(string $expected, string $from, string $to): void | CODE |
| LOW | tests/Output/DiffOnlyOutputBuilderTest.php | 34 | public static function textForNoNonDiffLinesProvider(): array | CODE |
| LOW | tests/Output/DiffOnlyOutputBuilderTest.php | 73 | public function testDiffDoNotShowNonDiffLines(string $expected, string $from, string $to, string $header = ''): void | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 38 | public static function provideOutputBuildingCases(): array | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 54 | public static function provideBasicDiffGeneration(): array | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 72 | public static function provideConfiguredDiffGeneration(): array | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 222 | public static function provideInvalidConfiguration(): array | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 283 | public static function provideCommonLineThresholdCases(): array | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 331 | public static function provideContextLineConfigurationCases(): array | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 596 | public function testConfiguredDiffGeneration(string $expected, string $from, string $to, array $config = []): void | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 646 | public function testCustomHeaderCanBeProvided(): void | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 658 | public function testCustomHeaderTakesPrecedenceOverFromFileAndToFile(): void | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 674 | public function testCustomHeaderWithoutTrailingNewlineGetsOneAppended(): void | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 686 | public function testLineNumbersCanBeOmittedFromHunkHeader(): void | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 700 | public function testNoLineEndEofWarningCanBeSuppressed(): void | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 714 | public function testDiffLineEndWarningIsEmittedWhenEnabled(): void | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 729 | public function testDiffLineEndWarningIsSuppressedByDefault(): void | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 742 | public function testInvalidAddLineNumbersOptionIsRejected(): void | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 754 | public function testInvalidEmitNoLineEndEofWarningOptionIsRejected(): void | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 766 | public function testInvalidEmitDiffLineEndWarningOptionIsRejected(): void | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 778 | public function testInvalidHeaderOptionIsRejected(): void | CODE |
| LOW | tests/Output/StrictUnifiedDiffOutputBuilderTest.php | 813 | public function testContextLineConfiguration(string $expected, string $from, string $to, int $contextLines, int $com | CODE |
| LOW | …/Output/StrictUnifiedDiffOutputBuilderDataProvider.php | 30 | public static function provideOutputBuildingCases(): array | CODE |
| LOW | …/Output/StrictUnifiedDiffOutputBuilderDataProvider.php | 138 | public static function provideBasicDiffGeneration(): array | CODE |
| LOW | …tion/StrictUnifiedDiffOutputBuilderIntegrationTest.php | 52 | public static function provideOutputBuildingCases(): array | CODE |
| LOW | …tion/StrictUnifiedDiffOutputBuilderIntegrationTest.php | 68 | public static function provideBasicDiffGeneration(): array | CODE |
| LOW | …tion/StrictUnifiedDiffOutputBuilderIntegrationTest.php | 129 | public function testIntegrationUsingPHPFileInVendorGitApply(string $fileFrom, string $fileTo): void | CODE |
| LOW | …tion/StrictUnifiedDiffOutputBuilderIntegrationTest.php | 147 | public function testIntegrationUsingPHPFileInVendorPatch(string $fileFrom, string $fileTo): void | CODE |
| LOW | …tion/StrictUnifiedDiffOutputBuilderIntegrationTest.php | 170 | public function testIntegrationOfUnitTestCasesGitApply(string $expected, string $from, string $to, ?array $options = | CODE |
| LOW | …tion/StrictUnifiedDiffOutputBuilderIntegrationTest.php | 181 | public function testIntegrationOfUnitTestCasesPatch(string $expected, string $from, string $to, ?array $options = nu | CODE |
| LOW | …tion/StrictUnifiedDiffOutputBuilderIntegrationTest.php | 187 | public function testIntegrationDiffOutputBuilderVersusDiffCommand(string $diff, string $from, string $to): void | CODE |
| LOW | …tion/StrictUnifiedDiffOutputBuilderIntegrationTest.php | 214 | private function doIntegrationTestGitApply(string $diff, string $from): void | CODE |
| LOW | tests/Utils/UnifiedDiffAssertTraitTest.php | 69 | public function testInvalidStartWithoutHeader(): void | CODE |
| LOW | tests/Utils/UnifiedDiffAssertTraitTest.php | 302 | public function testUnexpectedDuplicateNoNewLineEOF(): void | CODE |
| LOW | tests/Utils/UnifiedDiffAssertTraitTest.php | 388 | public function testUnexpectedEOFFromMissingLines(): void | CODE |
| LOW | tests/Utils/UnifiedDiffAssertTraitTest.php | 404 | public function testUnexpectedEOFToMissingLines(): void | CODE |
| LOW | tests/Utils/UnifiedDiffAssertTraitTest.php | 420 | public function testUnexpectedEOFBothFromAndToMissingLines(): void | CODE |
| LOW | tests/Utils/UnifiedDiffAssertTrait.php | 30 | public function assertValidUnifiedDiffFormat(string $diff): void | CODE |
| LOW | tests/Utils/UnifiedDiffAssertTrait.php | 189 | private function unifiedDiffAssertLinePrefix(string $line, string $message): string | CODE |
| LOW | tests/Utils/UnifiedDiffAssertTrait.php | 205 | private function unifiedDiffAssertStrLength(string $line, int $min, string $message): void | CODE |
| LOW | tests/Utils/UnifiedDiffAssertTrait.php | 221 | private function unifiedDiffAssertHeaderLine(string $line, string $start, string $message): void | CODE |
| LOW | tests/Utils/UnifiedDiffAssertTrait.php | 245 | private function unifiedDiffAssertHeaderDate(string $date, string $message): void | CODE |
| LOW | tests/Utils/UnifiedDiffAssertTrait.php | 264 | private function unifiedDiffAssertHunkHeader(string $line, string $message): array | CODE |
| 2 more matches not shown… | ||||