Skip to content

Commit 5cbc8f4

Browse files
committed
Use short array destructuring instead of list()
Introduced in PHP 7.1. Because it's shorter and looks nice. I used regex replacement. Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
1 parent d51cbf4 commit 5cbc8f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

includes/libs/uuid/GlobalIdGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ protected function timeWaitUntil( $time ) {
597597
* @throws RuntimeException
598598
*/
599599
protected function millisecondsSinceEpochBinary( array $time ) {
600-
list( $sec, $msec ) = $time;
600+
[ $sec, $msec ] = $time;
601601
$ts = 1000 * $sec + $msec;
602602
if ( $ts > 2 ** 52 ) {
603603
throw new RuntimeException( __METHOD__ .
@@ -614,7 +614,7 @@ protected function millisecondsSinceEpochBinary( array $time ) {
614614
* @throws RuntimeException
615615
*/
616616
protected function intervalsSinceGregorianBinary( array $time, $delta = 0 ) {
617-
list( $sec, $msec ) = $time;
617+
[ $sec, $msec ] = $time;
618618
$offset = '122192928000000000';
619619

620620
// 64 bit integers

0 commit comments

Comments
 (0)