Skip to content

Commit dc1400b

Browse files
committed
style: break long line
1 parent 1a16f9c commit dc1400b

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

system/Helpers/date_helper.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,16 @@ function now(?string $timezone = null): int
2929
}
3030

3131
$datetime = new DateTime('now', new DateTimeZone($timezone));
32-
sscanf($datetime->format('j-n-Y G:i:s'), '%d-%d-%d %d:%d:%d', $day, $month, $year, $hour, $minute, $second);
32+
sscanf(
33+
$datetime->format('j-n-Y G:i:s'),
34+
'%d-%d-%d %d:%d:%d',
35+
$day,
36+
$month,
37+
$year,
38+
$hour,
39+
$minute,
40+
$second
41+
);
3342

3443
return mktime($hour, $minute, $second, $month, $day, $year);
3544
}

tests/system/Helpers/DateHelperTest.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ public function testNowDefault()
3333
public function testNowSpecific()
3434
{
3535
// Chicago should be two hours ahead of Vancouver
36-
$this->assertCloseEnough(7200, now('America/Chicago') - now('America/Vancouver'));
36+
$this->assertCloseEnough(
37+
7200,
38+
now('America/Chicago') - now('America/Vancouver')
39+
);
3740
}
3841

3942
public function testTimezoneSelectDefault()
@@ -66,7 +69,10 @@ public function testTimezoneSelectSpecific()
6669

6770
$expected .= ("</select>\n");
6871

69-
$this->assertSame($expected, timezone_select('custom-select', 'Asia/Jakarta', $spesificRegion));
72+
$this->assertSame(
73+
$expected,
74+
timezone_select('custom-select', 'Asia/Jakarta', $spesificRegion)
75+
);
7076
}
7177

7278
public function testTimezoneSelectSingle()
@@ -84,6 +90,9 @@ public function testTimezoneSelectSingle()
8490

8591
$expected .= ("</select>\n");
8692

87-
$this->assertSame($expected, timezone_select('custom-select', 'Asia/Jakarta', $spesificRegion, $country));
93+
$this->assertSame(
94+
$expected,
95+
timezone_select('custom-select', 'Asia/Jakarta', $spesificRegion, $country)
96+
);
8897
}
8998
}

0 commit comments

Comments
 (0)