Various code cleanup.

This commit is contained in:
James Cole
2016-11-20 11:43:19 +01:00
parent 75a524c656
commit 94875adb6c
60 changed files with 544 additions and 563 deletions

View File

@@ -109,7 +109,7 @@ class Search implements SearchInterface
{
$categories = $this->user->categories()->get();
/** @var Collection $result */
$result = $categories->filter(
$result = $categories->filter(
function (Category $category) use ($words) {
if ($this->strpos_arr(strtolower($category->name), $words)) {
return $category;
@@ -118,7 +118,7 @@ class Search implements SearchInterface
return false;
}
);
$result = $result->slice(0, $this->limit);
$result = $result->slice(0, $this->limit);
return $result;
}
@@ -131,7 +131,7 @@ class Search implements SearchInterface
*/
public function searchTags(array $words): Collection
{
$tags = $this->user->tags()->get();
$tags = $this->user->tags()->get();
/** @var Collection $result */
$result = $tags->filter(