@@ -168,31 +168,31 @@ private static function getExpressionResolvers(): array
168
168
{
169
169
if (self ::$ resolvers === null ) {
170
170
self ::$ resolvers = [
171
- 'integer ' => function (Scope $ scope , Arg $ value ): ? \PhpParser \Node \Expr {
171
+ 'integer ' => function (Scope $ scope , Arg $ value ): \PhpParser \Node \Expr {
172
172
return new \PhpParser \Node \Expr \FuncCall (
173
173
new \PhpParser \Node \Name ('is_int ' ),
174
174
[$ value ]
175
175
);
176
176
},
177
- 'string ' => function (Scope $ scope , Arg $ value ): ? \PhpParser \Node \Expr {
177
+ 'string ' => function (Scope $ scope , Arg $ value ): \PhpParser \Node \Expr {
178
178
return new \PhpParser \Node \Expr \FuncCall (
179
179
new \PhpParser \Node \Name ('is_string ' ),
180
180
[$ value ]
181
181
);
182
182
},
183
- 'stringNotEmpty ' => function (Scope $ scope , Arg $ value ): ? \PhpParser \Node \Expr {
183
+ 'stringNotEmpty ' => function (Scope $ scope , Arg $ value ): \PhpParser \Node \Expr {
184
184
return new \PhpParser \Node \Expr \FuncCall (
185
185
new \PhpParser \Node \Name ('is_string ' ),
186
186
[$ value ]
187
187
);
188
188
},
189
- 'float ' => function (Scope $ scope , Arg $ value ): ? \PhpParser \Node \Expr {
189
+ 'float ' => function (Scope $ scope , Arg $ value ): \PhpParser \Node \Expr {
190
190
return new \PhpParser \Node \Expr \FuncCall (
191
191
new \PhpParser \Node \Name ('is_float ' ),
192
192
[$ value ]
193
193
);
194
194
},
195
- 'integerish ' => function (Scope $ scope , Arg $ value ): ? \PhpParser \Node \Expr {
195
+ 'integerish ' => function (Scope $ scope , Arg $ value ): \PhpParser \Node \Expr {
196
196
return new \PhpParser \Node \Expr \BinaryOp \BooleanOr (
197
197
new \PhpParser \Node \Expr \BinaryOp \BooleanAnd (
198
198
new \PhpParser \Node \Expr \FuncCall (
@@ -210,49 +210,49 @@ private static function getExpressionResolvers(): array
210
210
)
211
211
);
212
212
},
213
- 'numeric ' => function (Scope $ scope , Arg $ value ): ? \PhpParser \Node \Expr {
213
+ 'numeric ' => function (Scope $ scope , Arg $ value ): \PhpParser \Node \Expr {
214
214
return new \PhpParser \Node \Expr \FuncCall (
215
215
new \PhpParser \Node \Name ('is_numeric ' ),
216
216
[$ value ]
217
217
);
218
218
},
219
- 'boolean ' => function (Scope $ scope , Arg $ value ): ? \PhpParser \Node \Expr {
219
+ 'boolean ' => function (Scope $ scope , Arg $ value ): \PhpParser \Node \Expr {
220
220
return new \PhpParser \Node \Expr \FuncCall (
221
221
new \PhpParser \Node \Name ('is_bool ' ),
222
222
[$ value ]
223
223
);
224
224
},
225
- 'scalar ' => function (Scope $ scope , Arg $ value ): ? \PhpParser \Node \Expr {
225
+ 'scalar ' => function (Scope $ scope , Arg $ value ): \PhpParser \Node \Expr {
226
226
return new \PhpParser \Node \Expr \FuncCall (
227
227
new \PhpParser \Node \Name ('is_scalar ' ),
228
228
[$ value ]
229
229
);
230
230
},
231
- 'object ' => function (Scope $ scope , Arg $ value ): ? \PhpParser \Node \Expr {
231
+ 'object ' => function (Scope $ scope , Arg $ value ): \PhpParser \Node \Expr {
232
232
return new \PhpParser \Node \Expr \FuncCall (
233
233
new \PhpParser \Node \Name ('is_object ' ),
234
234
[$ value ]
235
235
);
236
236
},
237
- 'resource ' => function (Scope $ scope , Arg $ value ): ? \PhpParser \Node \Expr {
237
+ 'resource ' => function (Scope $ scope , Arg $ value ): \PhpParser \Node \Expr {
238
238
return new \PhpParser \Node \Expr \FuncCall (
239
239
new \PhpParser \Node \Name ('is_resource ' ),
240
240
[$ value ]
241
241
);
242
242
},
243
- 'isCallable ' => function (Scope $ scope , Arg $ value ): ? \PhpParser \Node \Expr {
243
+ 'isCallable ' => function (Scope $ scope , Arg $ value ): \PhpParser \Node \Expr {
244
244
return new \PhpParser \Node \Expr \FuncCall (
245
245
new \PhpParser \Node \Name ('is_callable ' ),
246
246
[$ value ]
247
247
);
248
248
},
249
- 'isArray ' => function (Scope $ scope , Arg $ value ): ? \PhpParser \Node \Expr {
249
+ 'isArray ' => function (Scope $ scope , Arg $ value ): \PhpParser \Node \Expr {
250
250
return new \PhpParser \Node \Expr \FuncCall (
251
251
new \PhpParser \Node \Name ('is_array ' ),
252
252
[$ value ]
253
253
);
254
254
},
255
- 'isIterable ' => function (Scope $ scope , Arg $ expr ): ? \PhpParser \Node \Expr {
255
+ 'isIterable ' => function (Scope $ scope , Arg $ expr ): \PhpParser \Node \Expr {
256
256
return new \PhpParser \Node \Expr \BinaryOp \BooleanOr (
257
257
new \PhpParser \Node \Expr \FuncCall (
258
258
new \PhpParser \Node \Name ('is_array ' ),
@@ -264,7 +264,7 @@ private static function getExpressionResolvers(): array
264
264
)
265
265
);
266
266
},
267
- 'isCountable ' => function (Scope $ scope , Arg $ expr ): ? \PhpParser \Node \Expr {
267
+ 'isCountable ' => function (Scope $ scope , Arg $ expr ): \PhpParser \Node \Expr {
268
268
return new \PhpParser \Node \Expr \BinaryOp \BooleanOr (
269
269
new \PhpParser \Node \Expr \FuncCall (
270
270
new \PhpParser \Node \Name ('is_array ' ),
@@ -300,43 +300,43 @@ private static function getExpressionResolvers(): array
300
300
)
301
301
);
302
302
},
303
- 'true ' => function (Scope $ scope , Arg $ expr ): ? \PhpParser \Node \Expr {
303
+ 'true ' => function (Scope $ scope , Arg $ expr ): \PhpParser \Node \Expr {
304
304
return new \PhpParser \Node \Expr \BinaryOp \Identical (
305
305
$ expr ->value ,
306
306
new \PhpParser \Node \Expr \ConstFetch (new \PhpParser \Node \Name ('true ' ))
307
307
);
308
308
},
309
- 'false ' => function (Scope $ scope , Arg $ expr ): ? \PhpParser \Node \Expr {
309
+ 'false ' => function (Scope $ scope , Arg $ expr ): \PhpParser \Node \Expr {
310
310
return new \PhpParser \Node \Expr \BinaryOp \Identical (
311
311
$ expr ->value ,
312
312
new \PhpParser \Node \Expr \ConstFetch (new \PhpParser \Node \Name ('false ' ))
313
313
);
314
314
},
315
- 'null ' => function (Scope $ scope , Arg $ expr ): ? \PhpParser \Node \Expr {
315
+ 'null ' => function (Scope $ scope , Arg $ expr ): \PhpParser \Node \Expr {
316
316
return new \PhpParser \Node \Expr \BinaryOp \Identical (
317
317
$ expr ->value ,
318
318
new \PhpParser \Node \Expr \ConstFetch (new \PhpParser \Node \Name ('null ' ))
319
319
);
320
320
},
321
- 'notNull ' => function (Scope $ scope , Arg $ expr ): ? \PhpParser \Node \Expr {
321
+ 'notNull ' => function (Scope $ scope , Arg $ expr ): \PhpParser \Node \Expr {
322
322
return new \PhpParser \Node \Expr \BinaryOp \NotIdentical (
323
323
$ expr ->value ,
324
324
new \PhpParser \Node \Expr \ConstFetch (new \PhpParser \Node \Name ('null ' ))
325
325
);
326
326
},
327
- 'same ' => function (Scope $ scope , Arg $ value1 , Arg $ value2 ): ? \PhpParser \Node \Expr {
327
+ 'same ' => function (Scope $ scope , Arg $ value1 , Arg $ value2 ): \PhpParser \Node \Expr {
328
328
return new \PhpParser \Node \Expr \BinaryOp \Identical (
329
329
$ value1 ->value ,
330
330
$ value2 ->value
331
331
);
332
332
},
333
- 'notSame ' => function (Scope $ scope , Arg $ value1 , Arg $ value2 ): ? \PhpParser \Node \Expr {
333
+ 'notSame ' => function (Scope $ scope , Arg $ value1 , Arg $ value2 ): \PhpParser \Node \Expr {
334
334
return new \PhpParser \Node \Expr \BinaryOp \NotIdentical (
335
335
$ value1 ->value ,
336
336
$ value2 ->value
337
337
);
338
338
},
339
- 'subclassOf ' => function (Scope $ scope , Arg $ expr , Arg $ class ): ? \PhpParser \Node \Expr {
339
+ 'subclassOf ' => function (Scope $ scope , Arg $ expr , Arg $ class ): \PhpParser \Node \Expr {
340
340
return new \PhpParser \Node \Expr \FuncCall (
341
341
new \PhpParser \Node \Name ('is_subclass_of ' ),
342
342
[
0 commit comments