Skip to content

Commit 6c3fb00

Browse files
committed
fix: php
1 parent 2118ada commit 6c3fb00

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

templates/php/src/Query.php.twig

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Query implements \JsonSerializable
4444
*/
4545
public static function equal(string $attribute, $value): string
4646
{
47-
return new Query('equal', $attribute, $value).__toString();
47+
return (new Query('equal', $attribute, $value))->__toString();
4848
}
4949
5050
/**
@@ -56,7 +56,7 @@ class Query implements \JsonSerializable
5656
*/
5757
public static function notEqual(string $attribute, $value): string
5858
{
59-
return new Query('notEqual', $attribute, $value).__toString();
59+
return (new Query('notEqual', $attribute, $value))->__toString();
6060
}
6161
6262
/**
@@ -68,7 +68,7 @@ class Query implements \JsonSerializable
6868
*/
6969
public static function lessThan(string $attribute, $value): string
7070
{
71-
return new Query('lessThan', $attribute, $value).__toString();
71+
return (new Query('lessThan', $attribute, $value))->__toString();
7272
}
7373
7474
/**
@@ -80,7 +80,7 @@ class Query implements \JsonSerializable
8080
*/
8181
public static function lessThanEqual(string $attribute, $value): string
8282
{
83-
return new Query('lessThanEqual', $attribute, $value).__toString();
83+
return (new Query('lessThanEqual', $attribute, $value))->__toString();
8484
}
8585
8686
/**
@@ -92,7 +92,7 @@ class Query implements \JsonSerializable
9292
*/
9393
public static function greaterThan(string $attribute, $value): string
9494
{
95-
return new Query('greaterThan', $attribute, $value).__toString();
95+
return (new Query('greaterThan', $attribute, $value))->__toString();
9696
}
9797
9898
/**
@@ -104,7 +104,7 @@ class Query implements \JsonSerializable
104104
*/
105105
public static function greaterThanEqual(string $attribute, $value): string
106106
{
107-
return new Query('greaterThanEqual', $attribute, $value).__toString();
107+
return (new Query('greaterThanEqual', $attribute, $value))->__toString();
108108
}
109109
110110
/**
@@ -116,7 +116,7 @@ class Query implements \JsonSerializable
116116
*/
117117
public static function search(string $attribute, string $value): string
118118
{
119-
return new Query('search', $attribute, $value).__toString();
119+
return (new Query('search', $attribute, $value))->__toString();
120120
}
121121
122122
/**
@@ -127,7 +127,7 @@ class Query implements \JsonSerializable
127127
*/
128128
public static function isNull(string $attribute): string
129129
{
130-
return new Query('isNull', $attribute, null).__toString();
130+
return (new Query('isNull', $attribute, null))->__toString();
131131
}
132132
133133
/**
@@ -138,7 +138,7 @@ class Query implements \JsonSerializable
138138
*/
139139
public static function isNotNull(string $attribute): string
140140
{
141-
return new Query('isNotNull', $attribute, null).__toString();
141+
return (new Query('isNotNull', $attribute, null))->__toString();
142142
}
143143
144144
/**
@@ -151,7 +151,7 @@ class Query implements \JsonSerializable
151151
*/
152152
public static function between(string $attribute, $start, $end): string
153153
{
154-
return new Query('between', $attribute, [$start, $end]).__toString();
154+
return (new Query('between', $attribute, [$start, $end]))->__toString();
155155
}
156156
157157
/**
@@ -163,7 +163,7 @@ class Query implements \JsonSerializable
163163
*/
164164
public static function startsWith(string $attribute, string $value): string
165165
{
166-
return new Query('startsWith', $attribute, $value).__toString();
166+
return (new Query('startsWith', $attribute, $value))->__toString();
167167
}
168168
169169
/**
@@ -175,7 +175,7 @@ class Query implements \JsonSerializable
175175
*/
176176
public static function endsWith(string $attribute, string $value): string
177177
{
178-
return new Query('endsWith', $attribute, $value).__toString();
178+
return (new Query('endsWith', $attribute, $value))->__toString();
179179
}
180180
181181
/**
@@ -186,7 +186,7 @@ class Query implements \JsonSerializable
186186
*/
187187
public static function select(array $attributes): string
188188
{
189-
return new Query('select', null, $attributes).__toString();
189+
return (new Query('select', null, $attributes))->__toString();
190190
}
191191
192192
/**
@@ -197,7 +197,7 @@ class Query implements \JsonSerializable
197197
*/
198198
public static function cursorAfter(string $documentId): string
199199
{
200-
return new Query('cursorAfter', null, $documentId).__toString();
200+
return (new Query('cursorAfter', null, $documentId))->__toString();
201201
}
202202
203203
/**
@@ -208,7 +208,7 @@ class Query implements \JsonSerializable
208208
*/
209209
public static function cursorBefore(string $documentId): string
210210
{
211-
return new Query('cursorBefore', null, $documentId).__toString();
211+
return (new Query('cursorBefore', null, $documentId))->__toString();
212212
}
213213
214214
/**
@@ -219,7 +219,7 @@ class Query implements \JsonSerializable
219219
*/
220220
public static function orderAsc(string $attribute): string
221221
{
222-
return new Query('orderAsc', $attribute, null).__toString();
222+
return (new Query('orderAsc', $attribute, null))->__toString();
223223
}
224224
225225
/**
@@ -230,7 +230,7 @@ class Query implements \JsonSerializable
230230
*/
231231
public static function orderDesc(string $attribute): string
232232
{
233-
return new Query('orderDesc', $attribute, null).__toString();
233+
return (new Query('orderDesc', $attribute, null))->__toString();
234234
}
235235
236236
/**
@@ -241,7 +241,7 @@ class Query implements \JsonSerializable
241241
*/
242242
public static function limit(int $limit): string
243243
{
244-
return new Query('limit', null, $limit).__toString();
244+
return (new Query('limit', null, $limit))->__toString();
245245
}
246246
247247
/**
@@ -252,7 +252,7 @@ class Query implements \JsonSerializable
252252
*/
253253
public static function offset(int $offset): string
254254
{
255-
return new Query('offset', null, $offset).__toString();
255+
return (new Query('offset', null, $offset))->__toString();
256256
}
257257
258258
/**
@@ -264,7 +264,7 @@ class Query implements \JsonSerializable
264264
*/
265265
public static function contains(string $attribute, string $value): string
266266
{
267-
return new Query('contains', $attribute, $value).__toString();
267+
return (new Query('contains', $attribute, $value))->__toString();
268268
}
269269
270270
/**
@@ -278,7 +278,7 @@ class Query implements \JsonSerializable
278278
foreach ($queries as &$query) {
279279
$query = \json_decode($query, true);
280280
}
281-
return new Query('or', null, $queries).__toString();
281+
return (new Query('or', null, $queries))->__toString();
282282
}
283283
284284
/**
@@ -292,6 +292,6 @@ class Query implements \JsonSerializable
292292
foreach ($queries as &$query) {
293293
$query = \json_decode($query, true);
294294
}
295-
return new Query('and', null, $queries).__toString();
295+
return (new Query('and', null, $queries))->__toString();
296296
}
297297
}

0 commit comments

Comments
 (0)