@@ -64,7 +64,7 @@ public static function create(SphinxQL $sphinxql)
6464 * $match->match($sub);
6565 * // (a | b)
6666 *
67- * @param string|Match|callable $keywords The text or expression to match.
67+ * @param string|Match|Closure $keywords The text or expression to match.
6868 */
6969 public function match ($ keywords = null )
7070 {
@@ -84,7 +84,7 @@ public function match($keywords = null)
8484 * $match->match('test')->orMatch('case');
8585 * // test | case
8686 *
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.
8888 */
8989 public function orMatch ($ keywords = null )
9090 {
@@ -103,7 +103,7 @@ public function orMatch($keywords = null)
103103 * $match->match('test')->maybe('case');
104104 * // test MAYBE case
105105 *
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.
107107 */
108108 public function maybe ($ keywords = null )
109109 {
@@ -267,7 +267,7 @@ public function quorum($keywords, $threshold)
267267 * $match->match('test')->before('case');
268268 * // test << case
269269 *
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.
271271 */
272272 public function before ($ keywords = null )
273273 {
@@ -329,8 +329,8 @@ public function boost($keyword, $amount = null)
329329 * $match->match('test')->near('case', 3);
330330 * // test NEAR/3 case
331331 *
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.
334334 */
335335 public function near ($ keywords , $ distance = null )
336336 {
@@ -351,7 +351,7 @@ public function near($keywords, $distance = null)
351351 * $match->match('test')->sentence('case');
352352 * // test SENTENCE case
353353 *
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.
355355 */
356356 public function sentence ($ keywords = null )
357357 {
@@ -370,7 +370,7 @@ public function sentence($keywords = null)
370370 * $match->match('test')->paragraph('case');
371371 * // test PARAGRAPH case
372372 *
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.
374374 */
375375 public function paragraph ($ keywords = null )
376376 {
@@ -392,8 +392,8 @@ public function paragraph($keywords = null)
392392 * $match->zone('th', 'test');
393393 * // ZONE:(th) test
394394 *
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.
397397 */
398398 public function zone ($ zones , $ keywords = null )
399399 {
@@ -416,8 +416,8 @@ public function zone($zones, $keywords = null)
416416 * $match->zonespan('th', 'test');
417417 * // ZONESPAN:(th) test
418418 *
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.
421421 */
422422 public function zonespan ($ zone , $ keywords = null )
423423 {
@@ -438,7 +438,7 @@ public function compile()
438438 $ query .= $ token ['MATCH ' ]->value ().' ' ;
439439 } elseif ($ token ['MATCH ' ] instanceof Match) {
440440 $ query .= '( ' .$ token ['MATCH ' ]->compile ()->getCompiled ().') ' ;
441- } elseif (is_callable ( $ token ['MATCH ' ]) ) {
441+ } elseif ($ token ['MATCH ' ] instanceof \Closure ) {
442442 $ sub = new static ($ this ->sphinxql );
443443 call_user_func ($ token ['MATCH ' ], $ sub );
444444 $ query .= '( ' .$ sub ->compile ()->getCompiled ().') ' ;
0 commit comments