Skip to content

Commit 9b2fd7a

Browse files
committed
cosmetics
1 parent eb498d6 commit 9b2fd7a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

phpSolrQueryParser.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected function tokenize($searchQuery)
9090
$tokens = array();
9191
$tokenArray = preg_split($this->getTokenizerRegexp(), $searchQuery, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
9292
foreach ($tokenArray as $token) {
93-
if (isset($map[strtolower( $token )])) {
93+
if (isset($map[strtolower($token)])) {
9494
$tokens[] = new phpSolrQueryToken($map[strtolower($token)], $token);
9595
} else {
9696
$tokens[] = new phpSolrQueryToken(phpSolrQueryToken::STRING, $token);
@@ -164,7 +164,7 @@ public function processToken($token)
164164
break;
165165
case phpSolrQueryToken::LOGICAL_OR:
166166
if ($this->stackType[$this->stackLevel] === 'and') {
167-
throw new Exception('You can not mix AND and OR without using "(" or ")".');
167+
throw new Exception('You can not mix AND and OR without using "(" and ")".');
168168
}
169169
$this->stackType[$this->stackLevel] = 'or';
170170
break;
@@ -274,8 +274,7 @@ public function processTerms($tokens)
274274
if (empty($this->stack[0])) {
275275
return array();
276276
}
277-
$this->stack = $this->stack[0];
278277

279-
return $this->stack;
278+
return $this->stack[0];
280279
}
281280
}

0 commit comments

Comments
 (0)