Provides the functionality to compare PHP values for equality.
This report summarizes scanner evidence for sebastianbergmann/comparator, a PHP project with 7,045 GitHub stars. SynthScan examined 7,392 lines of code across 69 source files, recording 91 pattern matches distributed across 1 syntactic category. The legacy adjusted pattern signal is 12.9 (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? 91 finding(s).
Are imports declared and package/API names verified? 0 finding(s).
Are wrappers, guards, and repeated structures necessary? 91 finding(s).
Which changes need focused human review? 91 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 91 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 | tests/unit/DateTimeComparatorTest.php | 46 | public static function assertEqualsSucceedsProvider(): array | CODE |
| LOW | tests/unit/DateTimeComparatorTest.php | 105 | public static function assertEqualsFailsProvider(): array | CODE |
| LOW | tests/unit/DateTimeComparatorTest.php | 195 | public function testAcceptsDateTimeInterface(): void | CODE |
| LOW | tests/unit/DateTimeComparatorTest.php | 200 | public function testAssertEqualsSkipsAlreadyProcessedPair(): void | CODE |
| LOW | tests/unit/DateTimeComparatorTest.php | 220 | public function testAssertEqualsSkipsAlreadyProcessedPairInReverseOrder(): void | CODE |
| LOW | tests/unit/DateTimeComparatorTest.php | 240 | public function testAssertEqualsRecordsProcessedPair(): void | CODE |
| LOW | tests/unit/ComparisonFailureTest.php | 89 | public function testCanBeSerializedAndUnserialized(): void | CODE |
| LOW | tests/unit/ComparisonFailureTest.php | 112 | public function testCanBeSerializedWhenStackTraceContainsNonSerializableObject(): void | CODE |
| LOW | tests/unit/ComparisonFailureTest.php | 133 | private function createFailureWithNonSerializableTraceArgument(NonSerializableClass $instance): ComparisonFailure | CODE |
| LOW | tests/unit/NumericComparatorTest.php | 71 | public static function assertEqualsSucceedsProvider(): array | CODE |
| LOW | tests/unit/NumericComparatorTest.php | 104 | public static function assertEqualsFailsProvider(): array | CODE |
| LOW | tests/unit/SplObjectStorageComparatorTest.php | 43 | public static function assertEqualsSucceedsProvider(): array | CODE |
| LOW | tests/unit/SplObjectStorageComparatorTest.php | 70 | public static function assertEqualsFailsProvider(): array | CODE |
| LOW | tests/unit/ClosureComparatorTest.php | 73 | public static function assertEqualsSucceedsProvider(): array | CODE |
| LOW | tests/unit/ClosureComparatorTest.php | 107 | public static function assertEqualsFailsProvider(): array | CODE |
| LOW | tests/unit/ClosureComparatorTest.php | 198 | public function testRecordsClosureComparisonInFactory(): void | CODE |
| LOW | tests/unit/ClosureComparatorTest.php | 213 | public function testAsStringComparisonFormat(): void | CODE |
| LOW | tests/unit/ObjectComparatorTest.php | 57 | public static function assertEqualsSucceedsProvider(): array | CODE |
| LOW | tests/unit/ObjectComparatorTest.php | 86 | public static function assertEqualsFailsProvider(): array | CODE |
| LOW | tests/unit/ObjectComparatorTest.php | 169 | public function testRepresentationProvidedByObjectExporterIsUsedWhenComparisonFails(): void | CODE |
| LOW | tests/unit/ObjectComparatorTest.php | 183 | public function testDefaultRepresentationIsUsedWhenObjectExporterDoesNotHandleObjects(): void | CODE |
| LOW | tests/unit/ObjectComparatorTest.php | 197 | private function comparatorWithObjectExporter(): ObjectComparator | CODE |
| LOW | tests/unit/DOMNodeComparatorTest.php | 61 | public static function assertEqualsSucceedsProvider(): array | CODE |
| LOW | tests/unit/DOMNodeComparatorTest.php | 107 | public static function assertEqualsFailsProvider(): array | CODE |
| LOW | tests/unit/DOMNodeComparatorTest.php | 152 | public static function assertEqualsSucceedsWhenCanonicalizationFailsProvider(): array | CODE |
| LOW | tests/unit/DOMNodeComparatorTest.php | 178 | public static function assertEqualsFailsWhenCanonicalizationFailsProvider(): array | CODE |
| LOW | tests/unit/DOMNodeComparatorTest.php | 238 | public function testAssertEqualsSucceedsWhenCanonicalizationFails(DOMDocument|DOMNode $expected, DOMDocument|DOMNode | CODE |
| LOW | tests/unit/DOMNodeComparatorTest.php | 251 | public function testAssertEqualsFailsWhenCanonicalizationFails(DOMDocument|DOMNode $expected, DOMDocument|DOMNode $a | CODE |
| LOW | tests/unit/DOMNodeComparatorTest.php | 259 | public function testFailingComparisonOfNonAsciiContentProducesReadableDiff(): void | CODE |
| LOW | tests/unit/EnumerationComparatorTest.php | 61 | public static function assertEqualsSucceedsProvider(): array | CODE |
| LOW | tests/unit/EnumerationComparatorTest.php | 73 | public static function assertEqualsFailsProvider(): array | CODE |
| LOW | tests/unit/ExceptionComparatorTest.php | 58 | public static function assertEqualsSucceedsProvider(): array | CODE |
| LOW | tests/unit/ExceptionComparatorTest.php | 77 | public static function assertEqualsFailsProvider(): array | CODE |
| LOW | tests/unit/DateIntervalComparatorTest.php | 46 | public static function assertEqualsSucceedsProvider(): array | CODE |
| LOW | tests/unit/DateIntervalComparatorTest.php | 81 | public static function assertEqualsFailsProvider(): array | CODE |
| LOW | tests/unit/DateIntervalComparatorTest.php | 135 | public function testAssertEqualsSkipsAlreadyProcessedPair(): void | CODE |
| LOW | tests/unit/DateIntervalComparatorTest.php | 155 | public function testAssertEqualsSkipsAlreadyProcessedPairInReverseOrder(): void | CODE |
| LOW | tests/unit/DateIntervalComparatorTest.php | 175 | public function testAssertEqualsRecordsProcessedPair(): void | CODE |
| LOW⚡ | tests/unit/MockObjectComparatorTest.php | 37 | public function testAcceptsMockOfSameInstance(): void | CODE |
| LOW⚡ | tests/unit/MockObjectComparatorTest.php | 44 | public function testAcceptsMockOfStdClass(): void | CODE |
| LOW⚡ | tests/unit/MockObjectComparatorTest.php | 51 | public function testAcceptsMocksOfDifferentClasses(): void | CODE |
| LOW⚡ | tests/unit/MockObjectComparatorTest.php | 61 | public function testDoesNotAcceptMockAndNull(): void | CODE |
| LOW⚡ | tests/unit/MockObjectComparatorTest.php | 71 | public function testDoesNotAcceptNullAndMock(): void | CODE |
| LOW⚡ | tests/unit/MockObjectComparatorTest.php | 81 | public function testDoesNotAcceptTwoNullValues(): void | CODE |
| LOW⚡ | tests/unit/MockObjectComparatorTest.php | 86 | public function testAssertEqualsSucceedsForSameMockInstance(): void | CODE |
| LOW⚡ | tests/unit/MockObjectComparatorTest.php | 96 | public function testAssertEqualsSucceedsForEqualMockInstances(): void | CODE |
| LOW | tests/unit/MockObjectComparatorTest.php | 111 | public function testAssertEqualsSucceedsForSameCyclicMock(): void | CODE |
| LOW | tests/unit/MockObjectComparatorTest.php | 125 | public function testAssertEqualsSucceedsForEqualCyclicMocks(): void | CODE |
| LOW | tests/unit/MockObjectComparatorTest.php | 148 | public function testAssertEqualsSucceedsForStructValuesWithinDelta(): void | CODE |
| LOW | tests/unit/MockObjectComparatorTest.php | 163 | public function testAssertEqualsFailsForDifferentMockInstances(): void | CODE |
| LOW | tests/unit/MockObjectComparatorTest.php | 181 | public function testAssertEqualsFailsForUnequalCyclicMocks(): void | CODE |
| LOW | tests/unit/MockObjectComparatorTest.php | 207 | public function testAssertEqualsFailsForMocksOfDifferentClasses(): void | CODE |
| LOW | tests/unit/MockObjectComparatorTest.php | 221 | public function testAssertEqualsFailsForStructValuesOutsideDelta(): void | CODE |
| LOW | tests/unit/ScalarComparatorTest.php | 69 | public static function assertEqualsSucceedsProvider(): array | CODE |
| LOW | tests/unit/ScalarComparatorTest.php | 98 | public static function assertEqualsFailsProvider(): array | CODE |
| LOW | tests/unit/ScalarComparatorTest.php | 135 | public static function assertEqualsFailsWithDiffProvider(): array | CODE |
| LOW | tests/unit/ScalarComparatorTest.php | 235 | public function testAssertEqualsFailsWithDiff(string $expectedDiff, string $expected, string $actual): void | CODE |
| LOW | tests/unit/TypeComparatorTest.php | 44 | public static function assertEqualsSucceedsProvider(): array | CODE |
| LOW | tests/unit/TypeComparatorTest.php | 63 | public static function assertEqualsFailsProvider(): array | CODE |
| LOW | tests/unit/ResourceComparatorTest.php | 59 | public static function assertEqualsSucceedsProvider(): array | CODE |
| 31 more matches not shown… | ||||