#36 Undo change intorduce by #31

Merged Maxime Rainville maxime-rainville

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 3 files from the diff.
Other files ignored by Codecov
.travis.yml has changed.
composer.json has changed.

@@ -2,7 +2,6 @@
Loading
2 2
3 3
namespace CWP\Search;
4 4
5 -
use SilverStripe\FullTextSearch\Search\Services\SearchableService;
6 5
use SilverStripe\ORM\PaginatedList;
7 6
use SilverStripe\View\ArrayData;
8 7
use SilverStripe\View\ViewableData;
@@ -62,15 +61,15 @@
Loading
62 61
    public function __construct($terms = '', ArrayData $results = null)
63 62
    {
64 63
        $this->query = $terms;
65 -
        $searchableService = SearchableService::singleton();
66 64
        if ($results) {
67 65
            // Clean up the results.
68 66
            $matches = $results->Matches;
69 67
            foreach ($matches as $result) {
70 -
                if (!$searchableService->isViewable($result)) {
68 +
                if (!$result->canView()) {
71 69
                    $matches->remove($result);
72 70
                }
73 71
            }
72 +
74 73
            $this->matches = $matches;
75 74
            $this->suggestion = $results->SuggestionNice;
76 75
        }

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Complexity Coverage
src ø 0.07% 22.58%
Project Totals (12 files) 107 22.58%
Loading