Repository Analysis

briannesbitt/Carbon

A simple PHP API extension for DateTime.

4.0 Likely human-written View on GitHub
4.0
Adjusted Score
4.0
Raw Score
100%
Time Factor
2026-05-22
Last Push
16,612
Stars
PHP
Language
333,774
Lines of Code
2025
Files
1284
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 0LOW 1284

Pattern Findings

1284 matches across 2 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers1278 hits · 1330 pts
SeverityFileLineSnippet
LOWsponsors.php16function getMaxHistoryMonthsByAmount($amount): int
LOWsponsors.php53function getOpenCollectiveSponsors(): string
LOWtests/AbstractTestCase.php227 public function assertInstanceOfCarbonInterval($d): void
LOWtests/PHPStan/Fixture.php20 public function testCarbonMacroCalledStatically(): string
LOWtests/PHPStan/Fixture.php25 public function testCarbonMacroCalledDynamically(): string
LOWtests/PHPStan/FeaturesTest.php41 public function testAnalysesWithoutErrors(): void
LOWtests/CarbonTimeZone/CreateTest.php67 public function testSafeCreateDateTimeZoneWithoutStrictMode()
LOWtests/CarbonTimeZone/ConversionsTest.php94 public function testToOffsetNameDateAsParam(string $date, string $expectedOffset, string|int $timezone)
LOWtests/CarbonTimeZone/ConversionsTest.php101 public function testToOffsetNameFromDifferentCreationMethods()
LOWtests/CarbonTimeZone/ConversionsTest.php141 public function testInvalidRegionForOffset()
LOWtests/CarbonTimeZone/ConversionsTest.php147 public function testInvalidRegionForOffsetInStrictMode()
LOWtests/CarbonPeriod/FilterTest.php49 public function testUpdateInternalStateWhenBuiltInFiltersAreRemoved()
LOWtests/CarbonPeriod/FilterTest.php113 public function testRemoveFilterByInstance()
LOWtests/CarbonPeriod/FilterTest.php271 public function testChangeNumberOfRecurrences()
LOWtests/CarbonPeriod/FilterTest.php313 public function testThrowExceptionWhenNextValidDateCannotBeFound()
LOWtests/CarbonPeriod/FilterTest.php388 public function testAddFilterFromCarbonMethod()
LOWtests/CarbonPeriod/FilterTest.php402 public function testAddFilterFromCarbonMacro()
LOWtests/CarbonPeriod/FilterTest.php423 public function testAddFilterFromCarbonMethodWithArguments()
LOWtests/CarbonPeriod/FilterTest.php437 public function testRemoveFilterFromCarbonMethod()
LOWtests/CarbonPeriod/FilterTest.php451 public function testInvalidCarbonMethodShouldNotBeConvertedToCallback()
LOWtests/CarbonPeriod/FilterTest.php479 public function testRemoveCallableFilters()
LOWtests/CarbonPeriod/MonthlyTest.php25 public function testMonthlyWithoutParameters()
LOWtests/CarbonPeriod/MonthlyTest.php98 public function testMonthlyWithStartDateAndRecurrences()
LOWtests/CarbonPeriod/MonthlyTest.php169 public function testMonthlyWithTimestamps()
LOWtests/CarbonPeriod/MonthlyTest.php211 public function testMonthlyWithEndDateAndRecurrences()
LOWtests/CarbonPeriod/AliasTest.php47 public function testSetStartDateWithNamedParameters()
LOWtests/CarbonPeriod/AliasTest.php112 public function testSetEndDateWithNamedParameters()
LOWtests/CarbonPeriod/AliasTest.php258 public function testModifyIntervalSingular()
LOWtests/CarbonPeriod/AliasTest.php298 public function testOverrideDefaultInterval()
LOWtests/CarbonPeriod/AliasTest.php311 public function testModifyIntoEmptyDateInterval()
LOWtests/CarbonPeriod/IteratorTest.php28 public function testKeyAndCurrentAreCorrectlyInstantiated()
LOWtests/CarbonPeriod/IteratorTest.php38 public function testValidIsCorrectlyInstantiated()
LOWtests/CarbonPeriod/IteratorTest.php45 public function testCurrentIsAlwaysCarbonInstance()
LOWtests/CarbonPeriod/IteratorTest.php73 public function testElementsInLoopAreAlwaysValid()
LOWtests/CarbonPeriod/IteratorTest.php82 public function testKeyAndCurrentAreCorrectlyIterated()
LOWtests/CarbonPeriod/IteratorTest.php93 public function testKeyAndCurrentAreCorrectlyRewound()
LOWtests/CarbonPeriod/IteratorTest.php105 public function testKeyAndCurrentAreNullAfterIteration()
LOWtests/CarbonPeriod/IteratorTest.php135 public static function dataForIterateBackwardsArguments(): Generator
LOWtests/CarbonPeriod/IteratorTest.php159 public function testChangingParametersShouldNotCauseInfiniteLoop()
LOWtests/CarbonPeriod/IteratorTest.php195 public function testChangeEndDateDuringIteration()
LOWtests/CarbonPeriod/IteratorTest.php224 public function testKeepIncreasingRecurrencesDuringIteration()
LOWtests/CarbonPeriod/IteratorTest.php253 public function testChangeStartDateDuringIteration()
LOWtests/CarbonPeriod/IteratorTest.php285 public function testChangeDateIntervalDuringIteration()
LOWtests/CarbonPeriod/IteratorTest.php312 public function testValidateOncePerIteration()
LOWtests/CarbonPeriod/IteratorTest.php330 public function testInvalidateCurrentAfterChangingParameters()
LOWtests/CarbonPeriod/IteratorTest.php342 public function testTraversePeriodDynamically()
LOWtests/CarbonPeriod/IteratorTest.php364 public function testExtendCompletedIteration()
LOWtests/CarbonPeriod/IteratorTest.php391 public function testRevalidateCurrentAfterChangeOfParameters()
LOWtests/CarbonPeriod/IteratorTest.php408 public function testRevalidateCurrentAfterEndOfIteration()
LOWtests/CarbonPeriod/IteratorTest.php423 public function testChangeStartDateBeforeIteration()
LOWtests/CarbonPeriod/IteratorTest.php433 public function testChangeStartDateAfterStartedIteration()
LOWtests/CarbonPeriod/IteratorTest.php446 public function testInvertDateIntervalDuringIteration()
LOWtests/CarbonPeriod/DynamicIntervalTest.php21 public function testDynamicIntervalInPeriod()
LOWtests/CarbonPeriod/MacroTest.php64 public function testParameterOtherThanSelfIsNotGivenPeriodInstance()
LOWtests/CarbonPeriod/MacroTest.php77 public function testPassPeriodInstanceAfterOptionalParameters()
LOWtests/CarbonPeriod/MacroTest.php96 public function testMacroIsBindedToDatePeriodInstance()
LOWtests/CarbonPeriod/MacroTest.php127 public function testMacroIsBoundToDatePeriodClass()
LOWtests/CarbonPeriod/MacroTest.php137 public function testRegisterNonClosureMacro()
LOWtests/CarbonPeriod/MacroTest.php173 public function testCallNonExistingMacroStatically()
LOWtests/CarbonPeriod/MacroTest.php193 public function testInstantiateViaStaticMacroCall()
1218 more matches not shown…
Over-Commented Block6 hits · 4 pts
SeverityFileLineSnippet
LOWtests/Unit/UnitTest.php41 #[TestWith([Unit::Quarter, 'quarters'])]
LOWtests/Carbon/StartEndOfTest.php441 {
LOWtests/Carbon/StartEndOfTest.php461 $this->assertCarbon($dt->startOfQuarter(), 2015, $startOfQuarterMonth, 1, 0, 0, 0);
LOWtests/CarbonImmutable/StartEndOfTest.php361
LOWtests/CarbonImmutable/StartEndOfTest.php381 {
LOWsrc/Carbon/Traits/Date.php921 // @call setUnit