Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/DotenvVault.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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();

Expand All @@ -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)
Expand All @@ -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();

Expand All @@ -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)
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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) {
Expand Down