Skip to content

Commit

Permalink
Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_…
Browse files Browse the repository at this point in the history
…null_value
  • Loading branch information
nicolas-grekas committed Jan 23, 2024
1 parent 07d7557 commit 4de4884
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Command/DotenvDumpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class DotenvDumpCommand extends Command
private $projectDir;
private $defaultEnv;

public function __construct(string $projectDir, string $defaultEnv = null)
public function __construct(string $projectDir, ?string $defaultEnv = null)
{
$this->projectDir = $projectDir;
$this->defaultEnv = $defaultEnv;
Expand Down
2 changes: 1 addition & 1 deletion Dotenv.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function load(string $path, string ...$extraPaths): void
* @throws FormatException when a file has a syntax error
* @throws PathException when a file does not exist or is not readable
*/
public function loadEnv(string $path, string $envKey = null, string $defaultEnv = 'dev', array $testEnvs = ['test'], bool $overrideExistingVars = false): void
public function loadEnv(string $path, ?string $envKey = null, string $defaultEnv = 'dev', array $testEnvs = ['test'], bool $overrideExistingVars = false): void
{
$k = $envKey ?? $this->envKey;

Expand Down
2 changes: 1 addition & 1 deletion Exception/FormatException.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class FormatException extends \LogicException implements ExceptionInterfac
{
private $context;

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

Expand Down
2 changes: 1 addition & 1 deletion Exception/PathException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
final class PathException extends \RuntimeException implements ExceptionInterface
{
public function __construct(string $path, int $code = 0, \Throwable $previous = null)
public function __construct(string $path, int $code = 0, ?\Throwable $previous = null)
{
parent::__construct(sprintf('Unable to read the "%s" environment file.', $path), $code, $previous);
}
Expand Down

0 comments on commit 4de4884

Please sign in to comment.