Smile-SA/elasticsuite

View on GitHub
src/module-elasticsuite-tracker/Helper/Data.php

Summary

Maintainability
B
4 hrs
Test Coverage

Showing 4 of 4 total issues

Data has 17 functions (exceeds 10 allowed). Consider refactoring.
Open

class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
/**
* Module status configuration path
* @var string
Severity: Minor
Found in src/module-elasticsuite-tracker/Helper/Data.php - About 3 hrs to fix

    Assigning \Magento\Store\Model\StoreManagerInterface to property but \Smile\ElasticsuiteTracker\Helper\Data->storeManager is \Magento\Framework\App\Config\ScopeConfigInterface
    Open

    $this->storeManager = $storeManager;

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

    public function getCurrentVisitorId()
    {
    $visitorId = null;
     
    $cookieConfig = $this->getCookieConfig();
    Severity: Minor
    Found in src/module-elasticsuite-tracker/Helper/Data.php and 1 other location - About 55 mins to fix
    src/module-elasticsuite-tracker/Helper/Data.php on lines 291..302

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

    public function getCurrentSessionId()
    {
    $visitorId = null;
     
    $cookieConfig = $this->getCookieConfig();
    Severity: Minor
    Found in src/module-elasticsuite-tracker/Helper/Data.php and 1 other location - About 55 mins to fix
    src/module-elasticsuite-tracker/Helper/Data.php on lines 273..284
    Category
    Status