Function loadVariationByFallback
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
public function loadVariationByFallback(Product $parentProduct, array $attributes)
{
$variation = false;
if ($this->isProductHasSwatch($parentProduct) && $parentProduct->getDocumentSource() !== null) {
Function loadVariationsFromSearchIndex
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
private function loadVariationsFromSearchIndex(Product $parentProduct, array $attributes)
{
$documentSource = $parentProduct->getDocumentSource();
$childrenIds = isset($documentSource['children_ids']) ? $documentSource['children_ids'] : [];
$variation = false;
Function getOptionIds
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
public function getOptionIds(Attribute $attribute, $labels)
{
$optionIds = [];
if (!is_array($labels)) {
There are no issues that match your filters.