Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PHP deprecation for implicit nullable types #235

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Broker/PeclFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PeclFactory implements FactoryInterface
/** @var array */
protected $amqpConnections = [];

public function __construct(LoggerInterface $logger = null, bool $publisherConfirms = false, float $timeout = 0.0)
public function __construct(?LoggerInterface $logger = null, bool $publisherConfirms = false, float $timeout = 0.0)
{
$this->logger = $logger ?: new NullLogger();
$this->publisherConfirms = $publisherConfirms;
Expand Down
2 changes: 1 addition & 1 deletion Broker/Publisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Publisher
/** @var LoggerInterface */
protected $logger;

public function __construct(FactoryInterface $factory, EventDispatcherInterface $eventDispatcher, array $messageTypes = [], LoggerInterface $logger = null)
public function __construct(FactoryInterface $factory, EventDispatcherInterface $eventDispatcher, array $messageTypes = [], ?LoggerInterface $logger = null)
{
$this->factory = $factory;
$this->eventDispatcher = $eventDispatcher;
Expand Down
2 changes: 1 addition & 1 deletion Command/SwarrotCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct(
ProcessorInterface $processor,
array $processorConfigurators,
array $extras,
string $queue = null,
?string $queue = null,
array $aliases = []
) {
$this->swarrotFactory = $swarrotFactory;
Expand Down
2 changes: 1 addition & 1 deletion DataCollector/SwarrotDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SwarrotDataCollector extends DataCollector
/**
* @param \Throwable|\Exception $exception
*/
public function collect(Request $request, Response $response, \Throwable $exception = null): void
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
{
}

Expand Down
Loading