diff --git a/src/thebigcrafter/omp/Language.php b/src/thebigcrafter/omp/Language.php index be0e1b1..49177e4 100644 --- a/src/thebigcrafter/omp/Language.php +++ b/src/thebigcrafter/omp/Language.php @@ -14,6 +14,7 @@ namespace thebigcrafter\omp; use Symfony\Component\Filesystem\Filesystem; +use thebigcrafter\omp\constants\Languages; use thebigcrafter\omp\lang\Locale; use function is_dir; use function mkdir; @@ -40,7 +41,7 @@ private static function saveAndLoadLanguageFiles() : void @mkdir($langFolder); } - foreach (Vars::AVAILABLE_LANGUAGES as $lang) { + foreach (Languages::AVAILABLE_LANGUAGES as $lang) { $languageFilePath = OhMyPMMP::getInstance()->getDataFolder() . "lang/$lang.json"; if (!$fs->exists($languageFilePath)) { diff --git a/src/thebigcrafter/omp/Vars.php b/src/thebigcrafter/omp/constants/Languages.php similarity index 56% rename from src/thebigcrafter/omp/Vars.php rename to src/thebigcrafter/omp/constants/Languages.php index 3838d9c..a8ebbf4 100644 --- a/src/thebigcrafter/omp/Vars.php +++ b/src/thebigcrafter/omp/constants/Languages.php @@ -11,9 +11,8 @@ declare(strict_types=1); -namespace thebigcrafter\omp; +namespace thebigcrafter\omp\constants; -final class Vars { - public const POGGIT_REPO_URL = "https://poggit.pmmp.io/releases.min.json?fields=name,version,artifact_url,html_url,license,downloads,score,api,deps,description_url,changelog_url"; - public const AVAILABLE_LANGUAGES = ["en_US"]; +final class Languages { + public const AVAILABLE_LANGUAGES = ["en_US"]; } diff --git a/src/thebigcrafter/omp/constants/Poggit.php b/src/thebigcrafter/omp/constants/Poggit.php new file mode 100644 index 0000000..7a8745d --- /dev/null +++ b/src/thebigcrafter/omp/constants/Poggit.php @@ -0,0 +1,18 @@ + + * + * This source file is subject to the GPL-3.0 license that is bundled + * with this source code in the file LICENSE. + */ + +declare(strict_types=1); + +namespace thebigcrafter\omp\constants; + +class Poggit { + public const REPO_URL = "https://poggit.pmmp.io/releases.min.json?fields=name,version,artifact_url,html_url,license,downloads,score,api,deps,description_url,changelog_url"; +} diff --git a/src/thebigcrafter/omp/tasks/FetchDataTask.php b/src/thebigcrafter/omp/tasks/FetchDataTask.php index 122564a..243a5f3 100644 --- a/src/thebigcrafter/omp/tasks/FetchDataTask.php +++ b/src/thebigcrafter/omp/tasks/FetchDataTask.php @@ -1,4 +1,4 @@ -