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 @@ -