From 9aa5f0fa091cc9221a3637cb0923ecc4de70eb26 Mon Sep 17 00:00:00 2001 From: Podlesnov Phedor Date: Thu, 8 Jul 2021 19:43:27 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=BE=D1=82=D0=B2=D0=B5=D1=82?= =?UTF-8?q?=D1=81=D0=B2=D0=B8=D0=B5=20=D1=80=D0=B0=D1=81=D1=88=D0=B8=D1=80?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0=20?= =?UTF-8?q?=D0=B8=20=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Settings.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Settings.php b/src/Settings.php index 5ba0767..dacdb13 100644 --- a/src/Settings.php +++ b/src/Settings.php @@ -16,7 +16,10 @@ class Settings extends Collection public function __construct ($file = null, $format = false) { - $this->format = $format ? $format : pathinfo($file, PATHINFO_EXTENSION); + $fileFormat = ['theme' => 'json']; + $extname = pathinfo($file, PATHINFO_EXTENSION); + + $this->format = $format ? $format : Arr::get($fileFormat, $extname, $extname); $this->file = $file; }