PHP 8.4: Implicitly nullable parameter declarations deprecated

This commit is contained in:
the-djmaze 2024-09-17 15:58:37 +02:00
parent 0263f8fe09
commit 4e3a7a6de2
24 changed files with 44 additions and 44 deletions

View file

@ -472,7 +472,7 @@ class Client implements ClientInterface, IteratorAggregate
*
* @return Pipeline|array
*/
protected function createPipeline(array $options = null, $callable = null)
protected function createPipeline(?array $options = null, $callable = null)
{
if (isset($options['atomic']) && $options['atomic']) {
$class = Atomic::class;
@ -525,7 +525,7 @@ class Client implements ClientInterface, IteratorAggregate
*
* @return MultiExecTransaction|array
*/
protected function createTransaction(array $options = null, $callable = null)
protected function createTransaction(?array $options = null, $callable = null)
{
$transaction = new MultiExecTransaction($this, $options);
@ -557,7 +557,7 @@ class Client implements ClientInterface, IteratorAggregate
*
* @return PubSubConsumer|null
*/
protected function createPubSub(array $options = null, $callable = null)
protected function createPubSub(?array $options = null, $callable = null)
{
if ($this->connection instanceof RelayConnection) {
$pubsub = new RelayPubSubConsumer($this, $options);

View file

@ -30,7 +30,7 @@ class Consumer extends AbstractConsumer
* @param ClientInterface $client Client instance used by the consumer.
* @param array $options Options for the consumer initialization.
*/
public function __construct(ClientInterface $client, array $options = null)
public function __construct(ClientInterface $client, ?array $options = null)
{
$this->checkCapabilities($client);

View file

@ -51,7 +51,7 @@ class MultiExec implements ClientContextInterface
* @param ClientInterface $client Client instance used by the transaction.
* @param array $options Initialization options.
*/
public function __construct(ClientInterface $client, array $options = null)
public function __construct(ClientInterface $client, ?array $options = null)
{
$this->assertClient($client);

View file

@ -401,7 +401,7 @@ class Client
* @param int $form_content_type HTTP form content type to use
* @return array
*/
private function executeRequest($url, $parameters = array(), $http_method = self::HTTP_METHOD_GET, array $http_headers = null, $form_content_type = self::HTTP_FORM_CONTENT_TYPE_MULTIPART)
private function executeRequest($url, $parameters = array(), $http_method = self::HTTP_METHOD_GET, ?array $http_headers = null, $form_content_type = self::HTTP_FORM_CONTENT_TYPE_MULTIPART)
{
$curl_options = array(
CURLOPT_RETURNTRANSFER => true,