Showing 185 of 185 total issues
Avoid variables with short names like $id. Configured minimum length is 3. Open
$id = ($this->getData('id')) ? $this->getData('id') : $this->getNameInLayout();
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The property $_jsonHelper is not named in camelCase. Open
class Log extends \ADM\QuickDevBar\Block\Tab\Panel
{
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
Avoid variables with short names like $f. Configured minimum length is 3. Open
$f = @fopen($filepath, "rb");
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The property $_resourceConfig is not named in camelCase. Open
class ConfigUpdate extends \ADM\QuickDevBar\Controller\Index
{
/**
* @var \Magento\Config\Model\Resource\Config
*/
- 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
Avoid variables with short names like $bt. Configured minimum length is 3. Open
public function formatTrace(array $bt)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The property $_elements is not named in camelCase. Open
class LayoutGenerateBlocksAfterObserver implements ObserverInterface
{
private $_elements = [];
- 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
Avoid variables with short names like $bt. Configured minimum length is 3. Open
public function formatSqlTrace(mixed $bt)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The property $_jsonHelper is not named in camelCase. 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 $_filePath is not named in camelCase. Open
class Db extends \Zend_Db_Profiler
{
protected static $_filePath;
protected $queryBacktrace = [];
- 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 $_storeManager is not named in camelCase. Open
class ConfigUpdate extends \ADM\QuickDevBar\Controller\Index
{
/**
* @var \Magento\Config\Model\Resource\Config
*/
- 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 $_resultRawFactory is not named in camelCase. Open
abstract class Index extends \Magento\Backend\App\Action
{
/**
* @var \Magento\Framework\View\LayoutFactory
- 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
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 $_tabs is not named in camelCase. Open
class ConfigSearch extends \ADM\QuickDevBar\Controller\Index
{
/**
* Tabs
- 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 $_qdbHelper is not named in camelCase. Open
class IsEnabled extends \Magento\Config\Block\System\Config\Form\Field
{
/**
* @var \ADM\QuickDevBar\Helper\Data
*/
- 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
class Toolbar extends \Magento\Framework\View\Element\Template
{
protected $_mainTabs;
protected $_qdnHelper;
- 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 $_frontUrl is not named in camelCase. Open
class Panel extends \Magento\Framework\View\Element\Template
{
protected $_mainTabs;
protected $_frontUrl;
- 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 $_qdbHelperRegister is not named in camelCase. Open
class Response
{
/**
*
* @var \ADM\QuickDevBar\Helper\Register
- 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
class Panel extends \Magento\Framework\View\Element\Template
{
protected $_mainTabs;
protected $_frontUrl;
- 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 $_configStructure is not named in camelCase. Open
class ConfigSearch extends \ADM\QuickDevBar\Controller\Index
{
/**
* Tabs
- 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
Avoid classes with short names like Db. Configured minimum length is 3. Open
class Db extends \Zend_Db_Profiler
{
protected static $_filePath;
protected $queryBacktrace = [];
- Read upRead up
- Exclude checks
ShortClassName
Since: 2.9
Detects when classes or interfaces have a very short name.
Example
class Fo {
}
interface Fo {
}