Smile-SA/elasticsuite

View on GitHub
src/module-elasticsuite-swatches/Model/Plugin/ProductImage.php

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 2 of 2 total issues

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

private function getFilterArray(array $request, \Magento\Catalog\Model\Product $product)
{
$filterArray = [];
$attributes = $this->eavConfig->getEntityAttributes(\Magento\Catalog\Model\Product::ENTITY, $product);
 
 
Severity: Minor
Found in src/module-elasticsuite-swatches/Model/Plugin/ProductImage.php - About 1 hr to fix

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

public function beforeGetImage(
\Magento\Catalog\Block\Product\AbstractProduct $subject,
\Magento\Catalog\Model\Product $product,
$location,
array $attributes = []
Severity: Minor
Found in src/module-elasticsuite-swatches/Model/Plugin/ProductImage.php - About 45 mins to fix

There are no issues that match your filters.

Category
Status