A simple PHP API extension for DateTime.
This report presents the forensic synthetic code analysis of briannesbitt/Carbon, a PHP project with 16,614 GitHub stars. SynthScan v2.0 examined 335,397 lines of code across 2028 source files, recording 1297 pattern matches distributed across 2 syntactic categories. The overall adjusted score of 4.0 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 1297 distinct pattern matches across 2 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | sponsors.php | 16 | function getMaxHistoryMonthsByAmount($amount): int | CODE |
| LOW | sponsors.php | 53 | function getOpenCollectiveSponsors(): string | CODE |
| LOW | tests/AbstractTestCase.php | 227 | public function assertInstanceOfCarbonInterval($d): void | CODE |
| LOW | tests/PHPStan/Fixture.php | 20 | public function testCarbonMacroCalledStatically(): string | CODE |
| LOW | tests/PHPStan/Fixture.php | 25 | public function testCarbonMacroCalledDynamically(): string | CODE |
| LOW | tests/PHPStan/FeaturesTest.php | 41 | public function testAnalysesWithoutErrors(): void | CODE |
| LOW | tests/CarbonTimeZone/CreateTest.php | 67 | public function testSafeCreateDateTimeZoneWithoutStrictMode() | CODE |
| LOW | tests/CarbonTimeZone/ConversionsTest.php | 94 | public function testToOffsetNameDateAsParam(string $date, string $expectedOffset, string|int $timezone) | CODE |
| LOW | tests/CarbonTimeZone/ConversionsTest.php | 101 | public function testToOffsetNameFromDifferentCreationMethods() | CODE |
| LOW | tests/CarbonTimeZone/ConversionsTest.php | 141 | public function testInvalidRegionForOffset() | CODE |
| LOW | tests/CarbonTimeZone/ConversionsTest.php | 147 | public function testInvalidRegionForOffsetInStrictMode() | CODE |
| LOW | tests/CarbonPeriod/FilterTest.php | 49 | public function testUpdateInternalStateWhenBuiltInFiltersAreRemoved() | CODE |
| LOW | tests/CarbonPeriod/FilterTest.php | 113 | public function testRemoveFilterByInstance() | CODE |
| LOW | tests/CarbonPeriod/FilterTest.php | 271 | public function testChangeNumberOfRecurrences() | CODE |
| LOW | tests/CarbonPeriod/FilterTest.php | 313 | public function testThrowExceptionWhenNextValidDateCannotBeFound() | CODE |
| LOW | tests/CarbonPeriod/FilterTest.php | 388 | public function testAddFilterFromCarbonMethod() | CODE |
| LOW | tests/CarbonPeriod/FilterTest.php | 402 | public function testAddFilterFromCarbonMacro() | CODE |
| LOW | tests/CarbonPeriod/FilterTest.php | 423 | public function testAddFilterFromCarbonMethodWithArguments() | CODE |
| LOW | tests/CarbonPeriod/FilterTest.php | 437 | public function testRemoveFilterFromCarbonMethod() | CODE |
| LOW | tests/CarbonPeriod/FilterTest.php | 451 | public function testInvalidCarbonMethodShouldNotBeConvertedToCallback() | CODE |
| LOW | tests/CarbonPeriod/FilterTest.php | 479 | public function testRemoveCallableFilters() | CODE |
| LOW | tests/CarbonPeriod/MonthlyTest.php | 25 | public function testMonthlyWithoutParameters() | CODE |
| LOW | tests/CarbonPeriod/MonthlyTest.php | 98 | public function testMonthlyWithStartDateAndRecurrences() | CODE |
| LOW | tests/CarbonPeriod/MonthlyTest.php | 169 | public function testMonthlyWithTimestamps() | CODE |
| LOW | tests/CarbonPeriod/MonthlyTest.php | 211 | public function testMonthlyWithEndDateAndRecurrences() | CODE |
| LOW | tests/CarbonPeriod/AliasTest.php | 48 | public function testSetStartDateWithNamedParameters() | CODE |
| LOW | tests/CarbonPeriod/AliasTest.php | 113 | public function testSetEndDateWithNamedParameters() | CODE |
| LOW | tests/CarbonPeriod/AliasTest.php | 259 | public function testModifyIntervalSingular() | CODE |
| LOW | tests/CarbonPeriod/AliasTest.php | 303 | public function testOverrideDefaultInterval() | CODE |
| LOW | tests/CarbonPeriod/AliasTest.php | 316 | public function testModifyIntoEmptyDateInterval() | CODE |
| LOW⚡ | tests/CarbonPeriod/IteratorTest.php | 29 | public function testKeyAndCurrentAreCorrectlyInstantiated() | CODE |
| LOW⚡ | tests/CarbonPeriod/IteratorTest.php | 39 | public function testValidIsCorrectlyInstantiated() | CODE |
| LOW⚡ | tests/CarbonPeriod/IteratorTest.php | 46 | public function testCurrentIsAlwaysCarbonInstance() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 74 | public function testElementsInLoopAreAlwaysValid() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 83 | public function testKeyAndCurrentAreCorrectlyIterated() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 94 | public function testKeyAndCurrentAreCorrectlyRewound() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 106 | public function testKeyAndCurrentAreNullAfterIteration() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 136 | public static function dataForIterateBackwardsArguments(): Generator | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 160 | public function testChangingParametersShouldNotCauseInfiniteLoop() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 196 | public function testChangeEndDateDuringIteration() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 225 | public function testKeepIncreasingRecurrencesDuringIteration() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 254 | public function testChangeStartDateDuringIteration() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 286 | public function testChangeDateIntervalDuringIteration() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 313 | public function testValidateOncePerIteration() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 331 | public function testInvalidateCurrentAfterChangingParameters() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 343 | public function testTraversePeriodDynamically() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 365 | public function testExtendCompletedIteration() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 392 | public function testRevalidateCurrentAfterChangeOfParameters() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 409 | public function testRevalidateCurrentAfterEndOfIteration() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 424 | public function testChangeStartDateBeforeIteration() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 434 | public function testChangeStartDateAfterStartedIteration() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 447 | public function testInvertDateIntervalDuringIteration() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 592 | public function testReverseOrderWithDynamicStep() | CODE |
| LOW | tests/CarbonPeriod/IteratorTest.php | 619 | public function testBackAndForthWithRecurrences() | CODE |
| LOW | tests/CarbonPeriod/DynamicIntervalTest.php | 21 | public function testDynamicIntervalInPeriod() | CODE |
| LOW | tests/CarbonPeriod/MacroTest.php | 64 | public function testParameterOtherThanSelfIsNotGivenPeriodInstance() | CODE |
| LOW | tests/CarbonPeriod/MacroTest.php | 77 | public function testPassPeriodInstanceAfterOptionalParameters() | CODE |
| LOW | tests/CarbonPeriod/MacroTest.php | 96 | public function testMacroIsBindedToDatePeriodInstance() | CODE |
| LOW | tests/CarbonPeriod/MacroTest.php | 127 | public function testMacroIsBoundToDatePeriodClass() | CODE |
| LOW | tests/CarbonPeriod/MacroTest.php | 137 | public function testRegisterNonClosureMacro() | CODE |
| 1231 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/Unit/UnitTest.php | 41 | #[TestWith([Unit::Quarter, 'quarters'])] | COMMENT |
| LOW | tests/Carbon/StartEndOfTest.php | 441 | { | COMMENT |
| LOW | tests/Carbon/StartEndOfTest.php | 461 | $this->assertCarbon($dt->startOfQuarter(), 2015, $startOfQuarterMonth, 1, 0, 0, 0); | COMMENT |
| LOW | tests/CarbonImmutable/StartEndOfTest.php | 361 | COMMENT | |
| LOW | tests/CarbonImmutable/StartEndOfTest.php | 381 | { | COMMENT |
| LOW | src/Carbon/Traits/Date.php | 921 | // @call addUnit | COMMENT |