From e664b84072f40afb1845c0cbf6d0592c714613e0 Mon Sep 17 00:00:00 2001 From: Jay Potter Date: Wed, 12 Aug 2026 16:01:10 -0400 Subject: [PATCH] re-namespace and remove class --- .../Behaviour.php => Environment.php} | 15 ++++++++------- src/Potter/Environment/Environment.php | 9 --------- 2 files changed, 8 insertions(+), 16 deletions(-) rename src/Potter/{Environment/Behaviour.php => Environment.php} (64%) delete mode 100644 src/Potter/Environment/Environment.php diff --git a/src/Potter/Environment/Behaviour.php b/src/Potter/Environment.php similarity index 64% rename from src/Potter/Environment/Behaviour.php rename to src/Potter/Environment.php index f753bd4..b311249 100644 --- a/src/Potter/Environment/Behaviour.php +++ b/src/Potter/Environment.php @@ -2,16 +2,17 @@ declare(strict_types=1); -namespace Potter\Environment; +namespace Potter; +use \Dotenv\Dotenv; use \Potter\Container; -trait Behaviour +trait Environment { private static function addEnvironment(Container $container): void { - $container->addShared(Environment::class, function () { - return Environment::createImmutable(getcwd()); }); + $container->addShared(Dotenv::class, function () { + return Dotenv::createImmutable(getcwd()); }); } private static function addEnvironmentBehaviour(Container $container): void @@ -21,13 +22,13 @@ trait Behaviour $environment->load(); } - private static function getEnvironment(Container $container): \Dotenv\Dotenv + private static function getEnvironment(Container $container): Dotenv { - return $container->get(Environment::class); + return $container->get(Dotenv::class); } private static function hasEnvironment(Container $container): bool { - return $container->has(Environment::class); + return $container->has(Dotenv::class); } } diff --git a/src/Potter/Environment/Environment.php b/src/Potter/Environment/Environment.php deleted file mode 100644 index 388f081..0000000 --- a/src/Potter/Environment/Environment.php +++ /dev/null @@ -1,9 +0,0 @@ -