Skip to content

Commit ccdc3ad

Browse files
committed
TASK: PHP 8.3 compatibility
1 parent 5373fc7 commit ccdc3ad

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

Classes/Domain/Model/Index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class Index
104104
* @param Client $client $client
105105
* @throws ElasticSearchException
106106
*/
107-
public function __construct(string $name, Client $client = null)
107+
public function __construct(string $name, ?Client $client = null)
108108
{
109109
$name = trim($name);
110110
if (empty($name) || strpos($name, '_') === 0) {
@@ -170,7 +170,7 @@ public function exists(): bool
170170
* @throws ElasticSearchException
171171
* @throws \Neos\Flow\Http\Exception
172172
*/
173-
public function request(string $method, string $path = null, array $arguments = [], $content = null, bool $prefixIndex = true): Response
173+
public function request(string $method, ?string $path = null, array $arguments = [], $content = null, bool $prefixIndex = true): Response
174174
{
175175
if ($this->client === null) {
176176
throw new ElasticSearchException('The client of the index "' . $this->prefixName() . '" is not set, hence no requests can be done.', 1566313883);

Classes/Indexer/Object/ObjectIndexer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class ObjectIndexer
7878
* @param Client $client
7979
* @return void
8080
*/
81-
public function indexObject($object, $signalInformation = null, Client $client = null)
81+
public function indexObject($object, $signalInformation = null, ?Client $client = null)
8282
{
8383
$type = $this->getIndexTypeForObject($object, $client);
8484
if ($type === null) {
@@ -98,7 +98,7 @@ public function indexObject($object, $signalInformation = null, Client $client =
9898
* @param Client $client
9999
* @return GenericType
100100
*/
101-
protected function getIndexTypeForObject($object, Client $client = null)
101+
protected function getIndexTypeForObject($object, ?Client $client = null)
102102
{
103103
if ($client === null) {
104104
$client = $this->client;
@@ -144,7 +144,7 @@ protected function getIndexablePropertiesAndValuesFromObject($object)
144144
* @param Client $client
145145
* @return void
146146
*/
147-
public function removeObject($object, $signalInformation = null, Client $client = null)
147+
public function removeObject($object, $signalInformation = null, ?Client $client = null)
148148
{
149149
$type = $this->getIndexTypeForObject($object, $client);
150150
if ($type === null) {
@@ -162,7 +162,7 @@ public function removeObject($object, $signalInformation = null, Client $client
162162
* @param Client $client
163163
* @return string one of this' ACTION_TYPE_* constants or NULL if no action is required
164164
*/
165-
public function objectIndexActionRequired($object, Client $client = null)
165+
public function objectIndexActionRequired($object, ?Client $client = null)
166166
{
167167
$type = $this->getIndexTypeForObject($object, $client);
168168
if ($type === null) {

Classes/Transfer/Exception.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Exception extends ElasticSearchException
3939
* @param RequestInterface|null $request
4040
* @param \Exception|null $previous
4141
*/
42-
public function __construct($message, $code, ResponseInterface $response, RequestInterface $request = null, \Exception $previous = null)
42+
public function __construct($message, $code, ResponseInterface $response, ?RequestInterface $request = null, \Exception $previous = null)
4343
{
4444
$this->response = $response;
4545
$this->request = $request;

Classes/Transfer/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Response
3737
* @throws Exception
3838
* @throws Exception\ApiException
3939
*/
40-
public function __construct(ResponseInterface $response, RequestInterface $request = null)
40+
public function __construct(ResponseInterface $response, ?RequestInterface $request = null)
4141
{
4242
$this->originalResponse = $response;
4343

Tests/Functional/Domain/DocumentTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function simpleDocumentDataProvider()
3737
* @dataProvider simpleDocumentDataProvider
3838
* @test
3939
*/
40-
public function idOfFreshNewDocumentIsPopulatedAfterStoring(array $data = null)
40+
public function idOfFreshNewDocumentIsPopulatedAfterStoring(?array $data = null)
4141
{
4242
$document = new Document(new TwitterType($this->testingIndex), $data);
4343
static::assertNull($document->getId());
@@ -49,7 +49,7 @@ public function idOfFreshNewDocumentIsPopulatedAfterStoring(array $data = null)
4949
* @dataProvider simpleDocumentDataProvider
5050
* @test
5151
*/
52-
public function versionOfFreshNewDocumentIsCreatedAfterStoringAndIncreasedAfterSubsequentStoring(array $data = null)
52+
public function versionOfFreshNewDocumentIsCreatedAfterStoringAndIncreasedAfterSubsequentStoring(?array $data = null)
5353
{
5454
$document = new Document(new TwitterType($this->testingIndex), $data);
5555
static::assertNull($document->getVersion());

0 commit comments

Comments
 (0)