vpietri/magento2-developer-quickdevbar

View on GitHub
Block/Tab/Wrapper.php

Summary

Maintainability
A
35 mins
Test Coverage

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

        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\Json\Helper\Data $jsonHelper,
        \ADM\QuickDevBar\Helper\Data $qdbHelper,
        \ADM\QuickDevBar\Helper\Register $qdbHelperRegister,
        array $data = []
Severity: Minor
Found in Block/Tab/Wrapper.php - About 35 mins to fix

    Avoid using static access to class '\Magento\Framework\Api\SimpleDataObjectConverter' in method 'getSubTabSuffix'.
    Open

            return SimpleDataObjectConverter::snakeCaseToCamelCase(str_replace('.', '_', $this->getNameInLayout()));
    Severity: Minor
    Found in Block/Tab/Wrapper.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    The property $_jsonHelper is not named in camelCase.
    Open

    class Wrapper extends Panel
    {
        protected $_mainTabs;
    
        protected $_jsonHelper;
    Severity: Minor
    Found in Block/Tab/Wrapper.php by phpmd

    CamelCasePropertyName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name attributes.

    Example

    class ClassName {
        protected $property_name;
    }

    Source

    The property $_mainTabs is not named in camelCase.
    Open

    class Wrapper extends Panel
    {
        protected $_mainTabs;
    
        protected $_jsonHelper;
    Severity: Minor
    Found in Block/Tab/Wrapper.php by phpmd

    CamelCasePropertyName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name attributes.

    Example

    class ClassName {
        protected $property_name;
    }

    Source

    There are no issues that match your filters.

    Category
    Status