@@ -64,7 +64,7 @@ public static function create(SphinxQL $sphinxql)
64
64
* $match->match($sub);
65
65
* // (a | b)
66
66
*
67
- * @param string|Match|callable $keywords The text or expression to match.
67
+ * @param string|Match|Closure $keywords The text or expression to match.
68
68
*/
69
69
public function match ($ keywords = null )
70
70
{
@@ -84,7 +84,7 @@ public function match($keywords = null)
84
84
* $match->match('test')->orMatch('case');
85
85
* // test | case
86
86
*
87
- * @param string|Match|callable $keywords The text or expression to alternatively match.
87
+ * @param string|Match|Closure $keywords The text or expression to alternatively match.
88
88
*/
89
89
public function orMatch ($ keywords = null )
90
90
{
@@ -103,7 +103,7 @@ public function orMatch($keywords = null)
103
103
* $match->match('test')->maybe('case');
104
104
* // test MAYBE case
105
105
*
106
- * @param string|Match|callable $keywords The text or expression to optionally match.
106
+ * @param string|Match|Closure $keywords The text or expression to optionally match.
107
107
*/
108
108
public function maybe ($ keywords = null )
109
109
{
@@ -267,7 +267,7 @@ public function quorum($keywords, $threshold)
267
267
* $match->match('test')->before('case');
268
268
* // test << case
269
269
*
270
- * @param string|Match|callable $keywords The text or expression that must come after.
270
+ * @param string|Match|Closure $keywords The text or expression that must come after.
271
271
*/
272
272
public function before ($ keywords = null )
273
273
{
@@ -329,8 +329,8 @@ public function boost($keyword, $amount = null)
329
329
* $match->match('test')->near('case', 3);
330
330
* // test NEAR/3 case
331
331
*
332
- * @param string|Match|callable $keywords The text or expression to match nearby.
333
- * @param int $distance Maximum distance to the match.
332
+ * @param string|Match|Closure $keywords The text or expression to match nearby.
333
+ * @param int $distance Maximum distance to the match.
334
334
*/
335
335
public function near ($ keywords , $ distance = null )
336
336
{
@@ -351,7 +351,7 @@ public function near($keywords, $distance = null)
351
351
* $match->match('test')->sentence('case');
352
352
* // test SENTENCE case
353
353
*
354
- * @param string|Match|callable $keywords The text or expression that must be in the sentence.
354
+ * @param string|Match|Closure $keywords The text or expression that must be in the sentence.
355
355
*/
356
356
public function sentence ($ keywords = null )
357
357
{
@@ -370,7 +370,7 @@ public function sentence($keywords = null)
370
370
* $match->match('test')->paragraph('case');
371
371
* // test PARAGRAPH case
372
372
*
373
- * @param string|Match|callable $keywords The text or expression that must be in the paragraph.
373
+ * @param string|Match|Closure $keywords The text or expression that must be in the paragraph.
374
374
*/
375
375
public function paragraph ($ keywords = null )
376
376
{
@@ -392,8 +392,8 @@ public function paragraph($keywords = null)
392
392
* $match->zone('th', 'test');
393
393
* // ZONE:(th) test
394
394
*
395
- * @param string|array $zones The zone or zones to search.
396
- * @param string|Match|callable $keywords The text or expression that must be in these zones.
395
+ * @param string|array $zones The zone or zones to search.
396
+ * @param string|Match|Closure $keywords The text or expression that must be in these zones.
397
397
*/
398
398
public function zone ($ zones , $ keywords = null )
399
399
{
@@ -416,8 +416,8 @@ public function zone($zones, $keywords = null)
416
416
* $match->zonespan('th', 'test');
417
417
* // ZONESPAN:(th) test
418
418
*
419
- * @param string $zone The zone to search.
420
- * @param string|Match|callable $keywords The text or expression that must be in this zone.
419
+ * @param string $zone The zone to search.
420
+ * @param string|Match|Closure $keywords The text or expression that must be in this zone.
421
421
*/
422
422
public function zonespan ($ zone , $ keywords = null )
423
423
{
@@ -438,7 +438,7 @@ public function compile()
438
438
$ query .= $ token ['MATCH ' ]->value ().' ' ;
439
439
} elseif ($ token ['MATCH ' ] instanceof Match) {
440
440
$ query .= '( ' .$ token ['MATCH ' ]->compile ()->getCompiled ().') ' ;
441
- } elseif (is_callable ( $ token ['MATCH ' ]) ) {
441
+ } elseif ($ token ['MATCH ' ] instanceof \Closure ) {
442
442
$ sub = new static ($ this ->sphinxql );
443
443
call_user_func ($ token ['MATCH ' ], $ sub );
444
444
$ query .= '( ' .$ sub ->compile ()->getCompiled ().') ' ;
0 commit comments