Skip to content

Commit 5a7d9a0

Browse files
Update Config.php
1 parent 4627cc3 commit 5a7d9a0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Config.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@ public static function set(string $var, $value): void
6767
*/
6868
public function read(string $file, string $path = null, bool $force = false): array
6969
{
70-
if ($force) {
70+
if ($force)
7171
return self::$config[$file] = self::load($file, $path);
72-
}
7372

7473
return self::$config[$file] ??= self::load($file, $path);
7574
}
@@ -80,9 +79,8 @@ public function read(string $file, string $path = null, bool $force = false): ar
8079
public static function load(string $name, string $path = null): array
8180
{
8281
$path = $path ?? self::DEFAULT_DIR;
83-
if (is_file($fileConfig = $path . $name . '.php')) {
82+
if (is_file($fileConfig = $path . $name . '.php'))
8483
return require $fileConfig;
85-
}
8684

8785
throw new \Exception(sprintf('Error when opening the configuration file [ %s ] ', $fileConfig));
8886
}

0 commit comments

Comments
 (0)