Skip to content

Commit

Permalink
Merge pull request #235 from stof/fix_php_deprecation
Browse files Browse the repository at this point in the history
Fix PHP deprecation for implicit nullable types
  • Loading branch information
stof authored Jul 4, 2024
2 parents 0640f10 + 3d03d56 commit c981ef6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
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

0 comments on commit c981ef6

Please sign in to comment.