Skip to content

Commit 9d16d04

Browse files
committed
Fix PHP contains queries
1 parent ad80d80 commit 9d16d04

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

templates/php/src/Query.php.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ class Query implements \JsonSerializable
262262
* @param string $value
263263
* @return string
264264
*/
265-
public static function contains(string $attribute, string $value): string
265+
public static function contains(string $attribute, array $value): string
266266
{
267267
return (new Query('contains', $attribute, $value))->__toString();
268268
}

tests/languages/php/test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@
139139
echo Query::cursorBefore('my_movie_id') . "\n";
140140
echo Query::limit(50) . "\n";
141141
echo Query::offset(20) . "\n";
142-
echo Query::contains('title', 'Spider') . "\n";
143-
echo Query::contains('labels', 'first') . "\n";
142+
echo Query::contains('title', ['Spider']) . "\n";
143+
echo Query::contains('labels', ['first']) . "\n";
144144
echo Query::or([
145145
Query::equal('released', [true]),
146146
Query::lessThan('releasedYear', 1990)

0 commit comments

Comments
 (0)