Skip to content

Commit 2ed81aa

Browse files
Update src/Php85/Php85.php
Co-authored-by: Nicolas Grekas <[email protected]>
1 parent d67a9bc commit 2ed81aa

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Php85/Php85.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ public static function array_first(array $array)
4444

4545
public static function array_last(array $array)
4646
{
47-
if ($array === []) {
48-
return null;
49-
}
50-
51-
return array_slice($array, -1, 1)[0];
47+
return $array ? current(array_slice($array, -1)) : null;
5248
}
5349
}

0 commit comments

Comments
 (0)