diff --git a/src/DotenvVault.php b/src/DotenvVault.php index 1ab8436..172b8cd 100644 --- a/src/DotenvVault.php +++ b/src/DotenvVault.php @@ -62,7 +62,7 @@ public function __construct( * * @return \Dotenv\Dotenv */ - public static function create(RepositoryInterface $repository, $paths, $names = null, bool $shortCircuit = true, string $fileEncoding = null) + public static function create(RepositoryInterface $repository, $paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null) { $builder = $names === null ? StoreBuilder::createWithDefaultName() : StoreBuilder::createWithNoNames(); @@ -91,7 +91,7 @@ public static function create(RepositoryInterface $repository, $paths, $names = * * @return \DotenvVault\DotenvVault */ - public static function createMutable($paths, $names = null, bool $shortCircuit = true, string $fileEncoding = null) + public static function createMutable($paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null) { $repository = RepositoryBuilder::createWithDefaultAdapters()->make(); @@ -108,7 +108,7 @@ public static function createMutable($paths, $names = null, bool $shortCircuit = * * @return \DotenvVault\DotenvVault */ - public static function createUnsafeMutable($paths, $names = null, bool $shortCircuit = true, string $fileEncoding = null) + public static function createUnsafeMutable($paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null) { $repository = RepositoryBuilder::createWithDefaultAdapters() ->addAdapter(PutenvAdapter::class) @@ -127,7 +127,7 @@ public static function createUnsafeMutable($paths, $names = null, bool $shortCir * * @return \DotenvVault\DotenvVault */ - public static function createImmutable($paths, $names = null, bool $shortCircuit = true, string $fileEncoding = null) + public static function createImmutable($paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null) { $repository = RepositoryBuilder::createWithDefaultAdapters()->immutable()->make(); @@ -144,7 +144,7 @@ public static function createImmutable($paths, $names = null, bool $shortCircuit * * @return \DotenvVault\DotenvVault */ - public static function createUnsafeImmutable($paths, $names = null, bool $shortCircuit = true, string $fileEncoding = null) + public static function createUnsafeImmutable($paths, $names = null, bool $shortCircuit = true, ?string $fileEncoding = null) { $repository = RepositoryBuilder::createWithDefaultAdapters() ->addAdapter(PutenvAdapter::class) @@ -180,7 +180,7 @@ public function load() public function _log($message) { - error_log("[dotenv-vault][INFO] {$message}"); +// error_log("[dotenv-vault][INFO] {$message}", 4); } public function _loadDotenv() @@ -236,7 +236,7 @@ public function _decryptVault() // Decrypt $decrypted = (new Decrypter())->decrypt($attrs['ciphertext'], $attrs['key']); - + // If successful, break the loop break; } catch (Exception $error) {