Smile-SA/elasticsuite

View on GitHub
src/module-elasticsuite-thesaurus/Model/ResourceModel/Thesaurus.php

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 2 of 2 total issues

Function saveTermsRelation has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

private function saveTermsRelation(\Magento\Framework\Model\AbstractModel $object)
{
$termRelations = $object->getTermsRelations() ?? [];
$termRelations = array_filter($termRelations);
 
 
Severity: Minor
Found in src/module-elasticsuite-thesaurus/Model/ResourceModel/Thesaurus.php - About 1 hr to fix

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

private function saveStoreRelation(\Magento\Framework\Model\AbstractModel $object)
{
$storeIds = $object->getStoreIds();
 
if (is_array($storeIds) && (count($storeIds) > 0)) {
Severity: Minor
Found in src/module-elasticsuite-thesaurus/Model/ResourceModel/Thesaurus.php - About 25 mins to fix

There are no issues that match your filters.

Category
Status