Smile-SA/elasticsuite

View on GitHub
src/module-elasticsuite-indices/Model/Index/Collection.php

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 2 of 2 total issues

Function applyPostFilters has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

private function applyPostFilters(array $filters = [], array $indices = [])
{
$filtered = [];
 
foreach ($indices as $index) {
Severity: Minor
Found in src/module-elasticsuite-indices/Model/Index/Collection.php - About 1 hr to fix

Function addFieldToFilter has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

public function addFieldToFilter($field, $condition = null)
{
$type = 'include';
if ($field === 'index_status') {
$type = 'exclude';
Severity: Minor
Found in src/module-elasticsuite-indices/Model/Index/Collection.php - About 35 mins to fix

There are no issues that match your filters.

Category
Status