Skip to content

Commit 57e44b4

Browse files
committed
use null coalescing operator
1 parent 79dc43a commit 57e44b4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/SnapshotRepository.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ public function getAll(): Collection
1919
->filter(function (string $fileName) {
2020
$pathinfo = pathinfo($fileName);
2121

22-
if (
23-
array_key_exists('extension', $pathinfo)
24-
&& $pathinfo['extension'] === 'gz'
25-
) {
22+
if (($pathinfo['extension'] ?? null) === 'gz') {
2623
$fileName = $pathinfo['filename'];
2724
}
2825

0 commit comments

Comments
 (0)