Smile-SA/elasticsuite

View on GitHub
src/module-elasticsuite-tracker/Block/Variables/Page/Order.php

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 3 of 3 total issues

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

Template\Context $context,
\Magento\Framework\Json\Helper\Data $jsonHelper,
\Smile\ElasticsuiteTracker\Helper\Data $trackerHelper,
\Magento\Framework\Registry $registry,
\Magento\Checkout\Model\Session $checkoutSession,
Severity: Minor
Found in src/module-elasticsuite-tracker/Block/Variables/Page/Order.php - About 45 mins to fix

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

    private function getOrderItemVariables($item, $itemId)
    {
    $variables = [];
     
    if (!$item->isDummy()) {
    Severity: Minor
    Found in src/module-elasticsuite-tracker/Block/Variables/Page/Order.php - About 25 mins to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    public function __construct(
    Template\Context $context,
    \Magento\Framework\Json\Helper\Data $jsonHelper,
    \Smile\ElasticsuiteTracker\Helper\Data $trackerHelper,
    \Magento\Framework\Registry $registry,
    src/module-elasticsuite-tracker/Block/Variables/Page/Cms.php on lines 44..55
    Category
    Status