Smile-SA/magento2-module-product-label

View on GitHub
Block/Product/ImageFactory.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method create has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function create(Product $product, string $imageId, ?array $attributes = null): ImageBlock
    {
        $viewImageConfig = $this->presentationConfig->getViewConfig()->getMediaAttributes(
            'Magento_Catalog',
            ImageHelper::MEDIA_TYPE_CONFIG_NODE,
Severity: Minor
Found in Block/Product/ImageFactory.php - About 1 hr to fix

    Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            ObjectManagerInterface $objectManager,
            ConfigInterface $presentationConfig,
            AssetImageFactory $viewAssetImageFactory,
            PlaceholderFactory $viewAssetPlaceholderFactory,
            ParamsBuilder $imageParamsBuilder
    Severity: Minor
    Found in Block/Product/ImageFactory.php - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status