From c5783a5a3331ec0260084a4aa6c1b810aefb2545 Mon Sep 17 00:00:00 2001 From: NaysKutzu <87282334+NaysKutzu@users.noreply.github.com> Date: Thu, 7 Nov 2024 00:03:37 +0100 Subject: [PATCH] PUSH -> Fix .yml.yml bug --- src/MythicalSystems/Utils/BungeeConfigApi.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/MythicalSystems/Utils/BungeeConfigApi.php b/src/MythicalSystems/Utils/BungeeConfigApi.php index 3cb0374..28e9fe7 100644 --- a/src/MythicalSystems/Utils/BungeeConfigApi.php +++ b/src/MythicalSystems/Utils/BungeeConfigApi.php @@ -50,7 +50,7 @@ private function checkSyntax(string $file): void */ public function getString(string $key): ?string { - $file = __DIR__ . '/' . $this->fileName . '.yml'; + $file = __DIR__ . '/' . $this->fileName; $yaml = Yaml::parseFile($file); $keys = explode('.', $key); $value = $yaml; @@ -72,7 +72,7 @@ public function getString(string $key): ?string * @return bool|null The integer value */ public function getInt(string $key) : ?int { - $file = __DIR__ . '/' . $this->fileName . '.yml'; + $file = __DIR__ . '/' . $this->fileName; $yaml = Yaml::parseFile($file); $keys = explode('.', $key); $value = $yaml; @@ -93,7 +93,7 @@ public function getInt(string $key) : ?int { * @return bool|null The boolean value */ public function getBool(string $key) : ?bool { - $file = __DIR__ . '/' . $this->fileName . '.yml'; + $file = __DIR__ . '/' . $this->fileName; $yaml = Yaml::parseFile($file); $keys = explode('.', $key); $value = $yaml; @@ -115,7 +115,7 @@ public function getBool(string $key) : ?bool { * @return array|null The array value */ public function getArray(string $key) : ?array { - $file = __DIR__ . '/' . $this->fileName . '.yml'; + $file = __DIR__ . '/' . $this->fileName; $yaml = Yaml::parseFile($file); $keys = explode('.', $key); $value = $yaml; @@ -138,7 +138,7 @@ public function getArray(string $key) : ?array { * @return mixed The value */ public function get(string $key): mixed { - $file = __DIR__ . '/' . $this->fileName . '.yml'; + $file = __DIR__ . '/' . $this->fileName; $yaml = Yaml::parseFile($file); $keys = explode('.', $key); $value = $yaml; @@ -162,7 +162,7 @@ public function get(string $key): mixed { * @return void */ public function set(string $key, mixed $value): void { - $file = __DIR__ . '/' . $this->fileName . '.yml'; + $file = __DIR__ . '/' . $this->fileName; $yaml = Yaml::parseFile($file); $keys = explode('.', $key); $value = $yaml; @@ -185,7 +185,7 @@ public function set(string $key, mixed $value): void { */ public function setString(string $key, string $value): void { - $file = __DIR__ . '/' . $this->fileName . '.yml'; + $file = __DIR__ . '/' . $this->fileName; $yaml = Yaml::parseFile($file); $keys = explode('.', $key); $value = $yaml; @@ -208,7 +208,7 @@ public function setString(string $key, string $value): void */ public function setInt(string $key, int $value): void { - $file = __DIR__ . '/' . $this->fileName . '.yml'; + $file = __DIR__ . '/' . $this->fileName; $yaml = Yaml::parseFile($file); $keys = explode('.', $key); $value = $yaml; @@ -231,7 +231,7 @@ public function setInt(string $key, int $value): void */ public function setBool(string $key, bool $value): void { - $file = __DIR__ . '/' . $this->fileName . '.yml'; + $file = __DIR__ . '/' . $this->fileName; $yaml = Yaml::parseFile($file); $keys = explode('.', $key); $value = $yaml; @@ -254,7 +254,7 @@ public function setBool(string $key, bool $value): void */ public function setArray(string $key, array $value): void { - $file = __DIR__ . '/' . $this->fileName . '.yml'; + $file = __DIR__ . '/' . $this->fileName; $yaml = Yaml::parseFile($file); $keys = explode('.', $key); $value = $yaml;