Skip to content

Commit 3cf5ecd

Browse files
committed
Add TrailingCommaInMultilineFixer
1 parent 68598d3 commit 3cf5ecd

25 files changed

Lines changed: 183 additions & 181 deletions

src/DayOfWeek.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public function __toString(): string
225225
4 => 'Thursday',
226226
5 => 'Friday',
227227
6 => 'Saturday',
228-
7 => 'Sunday'
228+
7 => 'Sunday',
229229
][$this->value];
230230
}
231231

src/Field/MonthOfYear.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public static function getName(int $monthOfYear): string
7777
9 => 'September',
7878
10 => 'October',
7979
11 => 'November',
80-
12 => 'December'
80+
12 => 'December',
8181
];
8282

8383
return $names[$monthOfYear];

src/Month.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ public function __toString(): string
250250
9 => 'September',
251251
10 => 'October',
252252
11 => 'November',
253-
12 => 'December'
253+
12 => 'December',
254254
][$this->month];
255255
}
256256

tests/AbstractTestCase.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected function assertInstantIs(int $epochSecond, int $nano, Instant $instant
5050
{
5151
$this->compare([$epochSecond, $nano], [
5252
$instant->getEpochSecond(),
53-
$instant->getNano()
53+
$instant->getNano(),
5454
]);
5555
}
5656

@@ -65,7 +65,7 @@ protected function assertLocalDateIs(int $year, int $month, int $day, LocalDate
6565
$this->compare([$year, $month, $day], [
6666
$date->getYear(),
6767
$date->getMonth(),
68-
$date->getDay()
68+
$date->getDay(),
6969
]);
7070
}
7171

@@ -82,7 +82,7 @@ protected function assertLocalTimeIs(int $hour, int $minute, int $second, int $n
8282
$time->getHour(),
8383
$time->getMinute(),
8484
$time->getSecond(),
85-
$time->getNano()
85+
$time->getNano(),
8686
]);
8787
}
8888

@@ -105,7 +105,7 @@ protected function assertLocalDateTimeIs(int $y, int $m, int $d, int $h, int $i,
105105
$dateTime->getHour(),
106106
$dateTime->getMinute(),
107107
$dateTime->getSecond(),
108-
$dateTime->getNano()
108+
$dateTime->getNano(),
109109
]);
110110
}
111111

@@ -121,7 +121,7 @@ protected function assertLocalDateTimeEquals(LocalDateTime $expected, LocalDateT
121121
protected function assertYearIs(int $yearValue, Year $year): void
122122
{
123123
$this->compare([$yearValue], [
124-
$year->getValue()
124+
$year->getValue(),
125125
]);
126126
}
127127

@@ -134,7 +134,7 @@ protected function assertYearMonthIs(int $year, int $month, YearMonth $yearMonth
134134
{
135135
$this->compare([$year, $month], [
136136
$yearMonth->getYear(),
137-
$yearMonth->getMonth()
137+
$yearMonth->getMonth(),
138138
]);
139139
}
140140

@@ -147,7 +147,7 @@ protected function assertYearWeekIs(int $year, int $week, YearWeek $yearWeek): v
147147
{
148148
$this->compare([$year, $week], [
149149
$yearWeek->getYear(),
150-
$yearWeek->getWeek()
150+
$yearWeek->getWeek(),
151151
]);
152152
}
153153

@@ -160,7 +160,7 @@ protected function assertMonthDayIs(int $month, int $day, MonthDay $monthDay): v
160160
{
161161
$this->compare([$month, $day], [
162162
$monthDay->getMonth(),
163-
$monthDay->getDay()
163+
$monthDay->getDay(),
164164
]);
165165
}
166166

@@ -171,7 +171,7 @@ protected function assertMonthDayIs(int $month, int $day, MonthDay $monthDay): v
171171
protected function assertMonthIs(int $monthValue, Month $month): void
172172
{
173173
$this->compare([$monthValue], [
174-
$month->getValue()
174+
$month->getValue(),
175175
]);
176176
}
177177

@@ -182,7 +182,7 @@ protected function assertMonthIs(int $monthValue, Month $month): void
182182
protected function assertDayOfWeekIs(int $dayOfWeekValue, DayOfWeek $dayOfWeek): void
183183
{
184184
$this->compare([$dayOfWeekValue], [
185-
$dayOfWeek->getValue()
185+
$dayOfWeek->getValue(),
186186
]);
187187
}
188188

@@ -195,7 +195,7 @@ protected function assertDurationIs(int $seconds, int $nanos, Duration $duration
195195
{
196196
$this->compare([$seconds, $nanos], [
197197
$duration->getSeconds(),
198-
$duration->getNanos()
198+
$duration->getNanos(),
199199
]);
200200
}
201201

@@ -210,7 +210,7 @@ protected function assertPeriodIs(int $years, int $months, int $days, Period $pe
210210
$this->compare([$years, $months, $days], [
211211
$period->getYears(),
212212
$period->getMonths(),
213-
$period->getDays()
213+
$period->getDays(),
214214
]);
215215
}
216216

@@ -258,7 +258,7 @@ protected function assertTimeZoneEquals(TimeZone $expected, TimeZone $actual): v
258258
protected function assertTimeZoneOffsetIs(int $totalSeconds, TimeZoneOffset $timeZoneOffset): void
259259
{
260260
$this->compare([$totalSeconds], [
261-
$timeZoneOffset->getTotalSeconds()
261+
$timeZoneOffset->getTotalSeconds(),
262262
]);
263263
}
264264

tests/Clock/OffsetClockTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function providerOffsetClock(): array
3838
[1000, 0, 'PT0.5S', 1000, 500000000],
3939
[1000, 0, 'PT-0.5S', 999, 500000000],
4040
[1000000, 123456789, '-PT1H30M', 994600, 123456789],
41-
[1000000, 123456789, 'PT5M30.9S', 1000331, 23456789]
41+
[1000000, 123456789, 'PT5M30.9S', 1000331, 23456789],
4242
];
4343
}
4444
}

tests/Clock/ScaleClockTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function providerScaleClock(): array
4545
[1000, 0, 'PT0.5S', 50, '1025'],
4646
[1000, 0, 'PT-0.5S', 5, '997.5'],
4747
[1000000, 123456789, '-PT1H30M', 7, '962200.123456789'],
48-
[1000000, 123456789, 'PT5M30.9S', -11, '996360.223456789']
48+
[1000000, 123456789, 'PT5M30.9S', -11, '996360.223456789'],
4949
];
5050
}
5151
}

tests/DayOfWeekTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function providerConstants(): array
3939
[4, DayOfWeek::THURSDAY],
4040
[5, DayOfWeek::FRIDAY],
4141
[6, DayOfWeek::SATURDAY],
42-
[7, DayOfWeek::SUNDAY]
42+
[7, DayOfWeek::SUNDAY],
4343
];
4444
}
4545

@@ -62,7 +62,7 @@ public function providerOfInvalidDayOfWeekThrowsException(): array
6262
return [
6363
[-1],
6464
[0],
65-
[8]
65+
[8],
6666
];
6767
}
6868

@@ -306,7 +306,7 @@ public function providerToString(): array
306306
[DayOfWeek::THURSDAY, 'Thursday'],
307307
[DayOfWeek::FRIDAY, 'Friday'],
308308
[DayOfWeek::SATURDAY, 'Saturday'],
309-
[DayOfWeek::SUNDAY, 'Sunday']
309+
[DayOfWeek::SUNDAY, 'Sunday'],
310310
];
311311
}
312312
}

tests/DurationTest.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function providerOfSeconds(): array
5252
[-4, 1000000001, -3, 1],
5353
[-2, -999999999, -3, 1],
5454
[1, -1000000001, -1, 999999999],
55-
[-1, -1000000001, -3, 999999999]
55+
[-1, -1000000001, -3, 999999999],
5656
];
5757
}
5858

@@ -92,7 +92,7 @@ public function providerOfNanos(): array
9292
[1000000002, 1, 2],
9393
[-2000000001, -3, 999999999],
9494
[PHP_INT_MAX, intdiv(PHP_INT_MAX, 1000000000), PHP_INT_MAX % 1000000000],
95-
[PHP_INT_MIN, intdiv(PHP_INT_MIN, 1000000000) - 1, PHP_INT_MIN % 1000000000 + 1000000000]
95+
[PHP_INT_MIN, intdiv(PHP_INT_MIN, 1000000000) - 1, PHP_INT_MIN % 1000000000 + 1000000000],
9696
];
9797
}
9898

@@ -245,7 +245,7 @@ public function providerParse(): array
245245
['-PT1M0.001S', -61, 999000000],
246246
['-PT1M-0.001S', -60, 1000000],
247247
['-PT-1M-0.001S', 60, 1000000],
248-
['-PT-1M0.001S', 59, 999000000]
248+
['-PT-1M0.001S', 59, 999000000],
249249
];
250250
}
251251

@@ -370,7 +370,7 @@ public function providerCompareToZero(): array
370370
[0, 1, 1],
371371
[1, -1, 1],
372372
[1, 0, 1],
373-
[1, 1, 1]
373+
[1, 1, 1],
374374
];
375375
}
376376

@@ -442,7 +442,7 @@ public function providerCompareTo(): array
442442
[1, 1, 0, 0, 1],
443443
[1, 1, 0, 1, 1],
444444
[1, 1, 1, 0, 1],
445-
[1, 1, 1, 1, 0]
445+
[1, 1, 1, 1, 0],
446446
];
447447
}
448448

@@ -601,7 +601,7 @@ public function providerPlusMinutes(): array
601601
[1, -2, -119],
602602
[1, -1, -59],
603603
[1, 0, 1],
604-
[1, 1, 61]
604+
[1, 1, 61],
605605
];
606606
}
607607

@@ -629,7 +629,7 @@ public function providerPlusHours(): array
629629
[1, -2, -7199],
630630
[1, -1, -3599],
631631
[1, 0, 1],
632-
[1, 1, 3601]
632+
[1, 1, 3601],
633633
];
634634
}
635635

@@ -657,7 +657,7 @@ public function providerPlusDays(): array
657657
[1, -2, -172799],
658658
[1, -1, -86399],
659659
[1, 0, 1],
660-
[1, 1, 86401]
660+
[1, 1, 86401],
661661
];
662662
}
663663

@@ -688,7 +688,7 @@ public function providerMinusSeconds(): array
688688
[-1, 1, -2],
689689
[-1, -1, 0],
690690
[-1, PHP_INT_MAX, PHP_INT_MIN],
691-
[-1, PHP_INT_MIN + 1, PHP_INT_MAX - 1]
691+
[-1, PHP_INT_MIN + 1, PHP_INT_MAX - 1],
692692
];
693693
}
694694

@@ -716,7 +716,7 @@ public function providerMinusMinutes(): array
716716
[1, -2, 121],
717717
[1, -1, 61],
718718
[1, 0, 1],
719-
[1, 1, -59]
719+
[1, 1, -59],
720720
];
721721
}
722722

@@ -744,7 +744,7 @@ public function providerMinusHours(): array
744744
[1, -2, 7201],
745745
[1, -1, 3601],
746746
[1, 0, 1],
747-
[1, 1, -3599]
747+
[1, 1, -3599],
748748
];
749749
}
750750

@@ -772,7 +772,7 @@ public function providerMinusDays(): array
772772
[1, -2, 172801],
773773
[1, -1, 86401],
774774
[1, 0, 1],
775-
[1, 1, -86399]
775+
[1, 1, -86399],
776776
];
777777
}
778778

@@ -964,7 +964,7 @@ public function providerNegated(): array
964964
[1, 1, -2, 999999999],
965965
[-2, 999999999, 1, 1],
966966
[-1, 1, 0, 999999999],
967-
[0, 999999999, -1, 1]
967+
[0, 999999999, -1, 1],
968968
];
969969
}
970970

@@ -1044,7 +1044,7 @@ public function providerGetTotalMillis(): array
10441044
[-123, 456000001, -122544],
10451045
[-123, 456999999, -122544],
10461046
[123, 456000001, 123456],
1047-
[123, 456999999, 123456]
1047+
[123, 456999999, 123456],
10481048
];
10491049
}
10501050

@@ -1067,7 +1067,7 @@ public function providerGetTotalMicros(): array
10671067
[-123, 456789001, -122543211],
10681068
[-123, 456789999, -122543211],
10691069
[123, 456789001, 123456789],
1070-
[123, 456789999, 123456789]
1070+
[123, 456789999, 123456789],
10711071
];
10721072
}
10731073

@@ -1090,7 +1090,7 @@ public function providerGetTotalNanos(): array
10901090
[-2, 000000001, -1999999999],
10911091
[-2, 999999999, -1000000001],
10921092
[1, 000000001, 1000000001],
1093-
[1, 999999999, 1999999999]
1093+
[1, 999999999, 1999999999],
10941094
];
10951095
}
10961096

tests/InstantTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function providerOf(): array
4646
[-4, 1000000001, -3, 1],
4747
[-2, -999999999, -3, 1],
4848
[1, -1000000001, -1, 999999999],
49-
[-1, -1000000001, -3, 999999999]
49+
[-1, -1000000001, -3, 999999999],
5050
];
5151
}
5252

@@ -110,7 +110,7 @@ public function providerPlus(): array
110110
[123456, 789, 123, 456789, 123579, 457578],
111111
[123456, 789, -123, -456789, 123332, 999544000],
112112
[123456789, 999999999, 1, 1, 123456791, 0],
113-
[123456789, 0, -1, -1, 123456787, 999999999]
113+
[123456789, 0, -1, -1, 123456787, 999999999],
114114
];
115115
}
116116

@@ -305,7 +305,7 @@ public function providerWithInvalidNanoThrowsException(): array
305305
{
306306
return [
307307
[-1],
308-
[1000000000]
308+
[1000000000],
309309
];
310310
}
311311

0 commit comments

Comments
 (0)