re-namespace and remove class

This commit is contained in:
2026-08-12 16:01:10 -04:00
parent 6318a565ec
commit e664b84072
2 changed files with 8 additions and 16 deletions
@@ -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);
}
}
-9
View File
@@ -1,9 +0,0 @@
<?php
declare(strict_types=1);
namespace Potter\Environment;
final class Environment
extends \Dotenv\Dotenv
{ }