Various code cleanup.

This commit is contained in:
James Cole
2017-09-16 09:24:48 +02:00
parent 3424ec1c27
commit 37250cbde3
18 changed files with 137 additions and 112 deletions

View File

@@ -204,8 +204,8 @@ class Search implements SearchInterface
// first "modifier" is always the text of the search:
// check descr of journal:
if (count($this->words) > 0
&& !$this->strpos_arr(strtolower(strval($transaction->description)), $this->words)
&& !$this->strpos_arr(strtolower(strval($transaction->transaction_description)), $this->words)
&& !$this->strposArray(strtolower(strval($transaction->description)), $this->words)
&& !$this->strposArray(strtolower(strval($transaction->transaction_description)), $this->words)
) {
Log::debug('Description does not match', $this->words);
@@ -230,7 +230,7 @@ class Search implements SearchInterface
*
* @return bool
*/
private function strpos_arr(string $haystack, array $needle)
private function strposArray(string $haystack, array $needle)
{
if (strlen($haystack) === 0) {
return false;