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

@@ -2,6 +2,7 @@
Loading
2 2
3 3
namespace CWP\Search;
4 4
5 +
use SilverStripe\FullTextSearch\Search\Services\SearchableService;
5 6
use SilverStripe\ORM\PaginatedList;
6 7
use SilverStripe\View\ArrayData;
7 8
use SilverStripe\View\ViewableData;
@@ -61,15 +62,15 @@
Loading
61 62
    public function __construct($terms = '', ArrayData $results = null)
62 63
    {
63 64
        $this->query = $terms;
65 +
        $searchableService = SearchableService::singleton();
64 66
        if ($results) {
65 67
            // Clean up the results.
66 68
            $matches = $results->Matches;
67 69
            foreach ($matches as $result) {
68 -
                if (!$result->canView()) {
70 +
                if (!$searchableService->isViewable($result)) {
69 71
                    $matches->remove($result);
70 72
                }
71 73
            }
72 -
73 74
            $this->matches = $matches;
74 75
            $this->suggestion = $results->SuggestionNice;
75 76
        }
Files Complexity Coverage
src 109 22.58%
Project Totals (12 files) 109 22.58%
92.5
TRAVIS_OS_NAME=linux
7.4=.4
1
comment: false
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading