public function getMainVariation(array $variations)
    {
        $mainVariation = array_filter($variations, function ($variation) {
            return $variation['isMain'] === true;
        });

        if (empty($mainVariation)) {
            return [];
        }

        return reset($mainVariation);
    }
public function getMainVariation(array $variations)
    {
        $mainVariation = array_filter($variations, function ($variation) {
            return $variation['isMain'] === true;
        });

        if (empty($mainVariation)) {
            return [];
        }

        return reset($mainVariation);
    }
@param array $variations

@return array