diff --git a/src/EnvReader/EnvConfig.php b/src/EnvReader/EnvConfig.php index 81637bb..e52dd2d 100644 --- a/src/EnvReader/EnvConfig.php +++ b/src/EnvReader/EnvConfig.php @@ -4,9 +4,7 @@ namespace jrosset\EnvReader; use Exception; -abstract class EnvConfig extends GenericConfig { - use TExternalFile; - +abstract class EnvConfig extends GenericConfig implements IExternalConfigFile { /** * @inheritDoc */ diff --git a/src/EnvReader/TExternalFile.php b/src/EnvReader/IExternalConfigFile.php similarity index 53% rename from src/EnvReader/TExternalFile.php rename to src/EnvReader/IExternalConfigFile.php index f075648..6505bd6 100644 --- a/src/EnvReader/TExternalFile.php +++ b/src/EnvReader/IExternalConfigFile.php @@ -3,13 +3,13 @@ namespace jrosset\EnvReader; /** - * Trait for config based on an external file + * Interface for config based on an external file */ -trait TExternalFile { +interface IExternalConfigFile { /** * Get the external config file path * * @return string The config file path */ - protected abstract function getConfigFilePath (): string; + public function getConfigFilePath (): string; } \ No newline at end of file diff --git a/tests/test_env.php b/tests/test_env.php index b148c5e..8ee92f7 100644 --- a/tests/test_env.php +++ b/tests/test_env.php @@ -12,7 +12,7 @@ class Env extends EnvConfig { 'WEBSITE_NAME' => 'Generic site', ]; } - protected function getConfigFilePath (): string { + public function getConfigFilePath (): string { return __DIR__ . '/.env'; } }