Skip to content

Commit 6b7dc91

Browse files
Merge pull request #804 from appwrite/fix-php-contains
Fix PHP contains
2 parents ad80d80 + 9cb82ef commit 6b7dc91

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

templates/php/src/Query.php.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,10 @@ class Query implements \JsonSerializable
259259
* Contains
260260
*
261261
* @param string $attribute
262-
* @param string $value
262+
* @param mixed $value
263263
* @return string
264264
*/
265-
public static function contains(string $attribute, string $value): string
265+
public static function contains(string $attribute, $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)