From f90ab26feedb61615bde2f94bbf5acc7e4f28342 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Mon, 8 Jul 2019 01:31:59 +0200 Subject: [PATCH] Moved translation helpers to sub namespace --- config/app.php | 2 +- includes/helper/email_helper.php | 3 ++- .../TranslationServiceProvider.php | 2 +- src/Helpers/{ => Translation}/Translator.php | 2 +- src/Middleware/LegacyMiddleware.php | 2 +- src/Middleware/SetLocale.php | 2 +- src/Renderer/Twig/Extensions/Translation.php | 2 +- src/helpers.php | 2 +- .../TranslationServiceProviderTest.php | 8 +++---- .../{ => Translation}/TranslatorTest.php | 22 +++++++++---------- tests/Unit/HelpersTest.php | 2 +- .../Unit/Middleware/LegacyMiddlewareTest.php | 2 +- tests/Unit/Middleware/SetLocaleTest.php | 2 +- .../Twig/Extensions/TranslationTest.php | 2 +- 14 files changed, 28 insertions(+), 27 deletions(-) rename src/Helpers/{ => Translation}/TranslationServiceProvider.php (97%) rename src/Helpers/{ => Translation}/Translator.php (98%) rename tests/Unit/Helpers/{ => Translation}/TranslationServiceProviderTest.php (91%) rename tests/Unit/Helpers/{ => Translation}/TranslatorTest.php (78%) diff --git a/config/app.php b/config/app.php index 17fdee11..5fda67dd 100644 --- a/config/app.php +++ b/config/app.php @@ -17,7 +17,7 @@ return [ \Engelsystem\Database\DatabaseServiceProvider::class, \Engelsystem\Http\RequestServiceProvider::class, \Engelsystem\Http\SessionServiceProvider::class, - \Engelsystem\Helpers\TranslationServiceProvider::class, + \Engelsystem\Helpers\Translation\TranslationServiceProvider::class, \Engelsystem\Http\ResponseServiceProvider::class, \Engelsystem\Http\Psr7ServiceProvider::class, \Engelsystem\Helpers\AuthenticatorServiceProvider::class, diff --git a/includes/helper/email_helper.php b/includes/helper/email_helper.php index bad0d539..3012d5ce 100644 --- a/includes/helper/email_helper.php +++ b/includes/helper/email_helper.php @@ -1,5 +1,6 @@ get('translator'); $locale = $translator->getLocale(); diff --git a/src/Helpers/TranslationServiceProvider.php b/src/Helpers/Translation/TranslationServiceProvider.php similarity index 97% rename from src/Helpers/TranslationServiceProvider.php rename to src/Helpers/Translation/TranslationServiceProvider.php index 4565dfcd..d0cda6a8 100644 --- a/src/Helpers/TranslationServiceProvider.php +++ b/src/Helpers/Translation/TranslationServiceProvider.php @@ -1,6 +1,6 @@