Skip to content

Commit 61f4baa

Browse files
chr-hertelCodeWithKyrian
authored andcommitted
Fix PHP 8.4 deprecations
1 parent e8602dc commit 61f4baa

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/Generated/Exceptions/ValidationException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function __construct(
1212
string $message,
1313
public readonly string $type,
1414
int $code = 422,
15-
\Throwable $previous = null)
15+
\Throwable|null $previous = null)
1616
{
1717
parent::__construct($message, $code, $previous);
1818
}
@@ -40,4 +40,4 @@ public function toArray(): array
4040
];
4141
}
4242

43-
}
43+
}

src/Resources/CollectionResource.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public function count(): int
205205
*/
206206
public function peek(
207207
int $limit = 10,
208-
array $include = null
208+
?array $include = null
209209
): GetItemsResponse
210210
{
211211
$include ??= ['embeddings', 'metadatas', 'distances'];
@@ -275,13 +275,13 @@ public function delete(?array $ids = null, ?array $where = null, ?array $whereDo
275275
*
276276
*/
277277
public function query(
278-
array $queryEmbeddings = null,
279-
array $queryTexts = null,
280-
array $queryImages = null,
278+
?array $queryEmbeddings = null,
279+
?array $queryTexts = null,
280+
?array $queryImages = null,
281281
int $nResults = 10,
282-
array $where = null,
283-
array $whereDocument = null,
284-
array $include = null
282+
?array $where = null,
283+
?array $whereDocument = null,
284+
?array $include = null
285285
): QueryItemsResponse
286286
{
287287
$include ??= ['embeddings', 'metadatas', 'distances'];
@@ -418,4 +418,4 @@ function validate(
418418

419419

420420
}
421-
}
421+
}

0 commit comments

Comments
 (0)