Block/Tab/Wrapper.php
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
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 = []
Avoid using static access to class '\Magento\Framework\Api\SimpleDataObjectConverter' in method 'getSubTabSuffix'. Open
Open
return SimpleDataObjectConverter::snakeCaseToCamelCase(str_replace('.', '_', $this->getNameInLayout()));
- Read upRead up
- Exclude checks
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
Open
class Wrapper extends Panel
{
protected $_mainTabs;
protected $_jsonHelper;
- Read upRead up
- Exclude checks
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
Open
class Wrapper extends Panel
{
protected $_mainTabs;
protected $_jsonHelper;
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}