Code rearrange and optimise.

This commit is contained in:
James Cole
2015-03-29 21:27:51 +02:00
parent 210f84b6ea
commit bea321939e
34 changed files with 155 additions and 155 deletions

View File

@@ -112,8 +112,8 @@ class Search implements SearchInterface
)->get();
// encrypted
$all = Auth::user()->transactionjournals()->withRelevantData()->where('encrypted', 1)->get();
$set = $all->filter(
$all = Auth::user()->transactionjournals()->withRelevantData()->where('encrypted', 1)->get();
$set = $all->filter(
function (TransactionJournal $journal) use ($words) {
foreach ($words as $word) {
$haystack = strtolower($journal->description);

View File

@@ -9,7 +9,8 @@ use Illuminate\Support\Collection;
*
* @package FireflyIII\Support\Search
*/
interface SearchInterface {
interface SearchInterface
{
/**
* @param array $words
*