Smile-SA/elasticsuite

View on GitHub
src/module-elasticsuite-virtual-category/Plugin/Search/RequestMapperPlugin.php

Summary

Maintainability
A
1 hr
Test Coverage

Showing 3 of 3 total issues

Function getCategoriesQuery has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

private function getCategoriesQuery($categoriesFilter, $storeId)
{
$result = [];
 
foreach ($categoriesFilter as $operator => $categoryIds) {

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

public function afterGetFilters(
RequestMapper $subject,
$result,
ContainerConfigurationInterface $containerConfiguration,
SearchCriteriaInterface $searchCriteria

Function decodeCategoryUid has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

private function decodeCategoryUid(&$result)
{
if (isset($result['category.category_uid'])) {
$decodeCb = function (string $categoryUid) {
return $this->uidEncoder->decode($categoryUid);

There are no issues that match your filters.

Category
Status