Skip to content

Commit

Permalink
PUSH
Browse files Browse the repository at this point in the history
-> Fix .yml.yml bug
  • Loading branch information
NaysKutzu committed Nov 6, 2024
1 parent 0f2bdc1 commit c5783a5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/MythicalSystems/Utils/BungeeConfigApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit c5783a5

Please sign in to comment.