Skip to content

Commit f886515

Browse files
committed
Fix forgotten Match occurences
1 parent 87b36a0 commit f886515

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/MatchBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(SphinxQL $sphinxql)
5151
* });
5252
* // (a | b)
5353
*
54-
* $sub = new Match($sphinxql);
54+
* $sub = new MatchBuilder($sphinxql);
5555
* $sub->match('a')->orMatch('b');
5656
* $match->match($sub);
5757
* // (a | b)
@@ -500,7 +500,7 @@ public function compile()
500500
if (key($token) == 'MATCH') {
501501
if ($token['MATCH'] instanceof Expression) {
502502
$query .= $token['MATCH']->value().' ';
503-
} elseif ($token['MATCH'] instanceof Match) {
503+
} elseif ($token['MATCH'] instanceof MatchBuilder) {
504504
$query .= '('.$token['MATCH']->compile()->getCompiled().') ';
505505
} elseif ($token['MATCH'] instanceof \Closure) {
506506
$sub = new static($this->sphinxql);

src/SphinxQL.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,10 @@ public function compileMatch()
470470
foreach ($this->match as $match) {
471471
$pre = '';
472472
if ($match['column'] instanceof \Closure) {
473-
$sub = new Match($this);
473+
$sub = new MatchBuilder($this);
474474
call_user_func($match['column'], $sub);
475475
$pre .= $sub->compile()->getCompiled();
476-
} elseif ($match['column'] instanceof Match) {
476+
} elseif ($match['column'] instanceof MatchBuilder) {
477477
$pre .= $match['column']->compile()->getCompiled();
478478
} elseif (empty($match['column'])) {
479479
$pre .= '';
@@ -980,7 +980,7 @@ public function from($array = null)
980980
/**
981981
* MATCH clause (Sphinx-specific)
982982
*
983-
* @param mixed $column The column name (can be array, string, Closure, or Match)
983+
* @param mixed $column The column name (can be array, string, Closure, or MatchBuilder)
984984
* @param string $value The value
985985
* @param bool $half Exclude ", |, - control characters from being escaped
986986
*

0 commit comments

Comments
 (0)