diff --git a/src/Origin.php b/src/Origin.php index 6857f3f1..f0f2c262 100644 --- a/src/Origin.php +++ b/src/Origin.php @@ -84,7 +84,7 @@ class Origin */ public function fileExtension(): ?string { - return empty($this->filePath) ? null : pathinfo($this->filePath, PATHINFO_EXTENSION); + return pathinfo($this->filePath ?: '', PATHINFO_EXTENSION) ?: null; } /**