Skip to content

Commit 4de4884

Browse files
Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
1 parent 07d7557 commit 4de4884

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Command/DotenvDumpCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ final class DotenvDumpCommand extends Command
3333
private $projectDir;
3434
private $defaultEnv;
3535

36-
public function __construct(string $projectDir, string $defaultEnv = null)
36+
public function __construct(string $projectDir, ?string $defaultEnv = null)
3737
{
3838
$this->projectDir = $projectDir;
3939
$this->defaultEnv = $defaultEnv;

Dotenv.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function load(string $path, string ...$extraPaths): void
107107
* @throws FormatException when a file has a syntax error
108108
* @throws PathException when a file does not exist or is not readable
109109
*/
110-
public function loadEnv(string $path, string $envKey = null, string $defaultEnv = 'dev', array $testEnvs = ['test'], bool $overrideExistingVars = false): void
110+
public function loadEnv(string $path, ?string $envKey = null, string $defaultEnv = 'dev', array $testEnvs = ['test'], bool $overrideExistingVars = false): void
111111
{
112112
$k = $envKey ?? $this->envKey;
113113

Exception/FormatException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class FormatException extends \LogicException implements ExceptionInterfac
2020
{
2121
private $context;
2222

23-
public function __construct(string $message, FormatExceptionContext $context, int $code = 0, \Throwable $previous = null)
23+
public function __construct(string $message, FormatExceptionContext $context, int $code = 0, ?\Throwable $previous = null)
2424
{
2525
$this->context = $context;
2626

Exception/PathException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
final class PathException extends \RuntimeException implements ExceptionInterface
2020
{
21-
public function __construct(string $path, int $code = 0, \Throwable $previous = null)
21+
public function __construct(string $path, int $code = 0, ?\Throwable $previous = null)
2222
{
2323
parent::__construct(sprintf('Unable to read the "%s" environment file.', $path), $code, $previous);
2424
}

0 commit comments

Comments
 (0)