From 7783036c204dd55bb8da89b709cfe9336b316a07 Mon Sep 17 00:00:00 2001 From: Nathan Bolender Date: Wed, 18 Dec 2019 18:26:33 -0500 Subject: [PATCH] formatting --- src/TNTSearch.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/TNTSearch.php b/src/TNTSearch.php index e180cea..b883bd0 100644 --- a/src/TNTSearch.php +++ b/src/TNTSearch.php @@ -151,8 +151,8 @@ public function search($phrase, $numOfResults = 100) */ public function searchBoolean($phrase, $numOfResults = 100) { - $keywords = $this->breakIntoTokens($phrase); - $lastKeyword = end($keywords); + $keywords = $this->breakIntoTokens($phrase); + $lastKeyword = end($keywords); $stack = []; $startTimer = microtime(true); @@ -165,12 +165,12 @@ public function searchBoolean($phrase, $numOfResults = 100) $left = array_pop($stack); $right = array_pop($stack); if (is_string($left)) { - $isLastKeyword = $left == $lastKeyword; + $isLastKeyword = $left == $lastKeyword; $left = $this->getAllDocumentsForKeyword($this->stemmer->stem($left), true, $isLastKeyword) ->pluck('doc_id'); } if (is_string($right)) { - $isLastKeyword = $right == $lastKeyword; + $isLastKeyword = $right == $lastKeyword; $right = $this->getAllDocumentsForKeyword($this->stemmer->stem($right), true, $isLastKeyword) ->pluck('doc_id'); } @@ -188,12 +188,12 @@ public function searchBoolean($phrase, $numOfResults = 100) $right = array_pop($stack); if (is_string($left)) { - $isLastKeyword = $left == $lastKeyword; + $isLastKeyword = $left == $lastKeyword; $left = $this->getAllDocumentsForKeyword($this->stemmer->stem($left), true, $isLastKeyword) ->pluck('doc_id'); } if (is_string($right)) { - $isLastKeyword = $right == $lastKeyword; + $isLastKeyword = $right == $lastKeyword; $right = $this->getAllDocumentsForKeyword($this->stemmer->stem($right), true, $isLastKeyword) ->pluck('doc_id'); }