ImpressCMS/impresscms

View on GitHub

Showing 47,251 of 47,256 total issues

Avoid variables with short names like $jy. Configured minimum length is 3.
Open

    $jy = 979+33*$j_np+4*div($j_day_no,1461); /* 1461 = 365*4 + 4/4 */
Severity: Minor
Found in htdocs/include/jalali.php by phpmd

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 parameter $event_name is not named in camelCase.
Open

function &notificationEventInfo($category_name, $event_name, $module_id=null) {
    icms_core_Debug::setDeprecated('icms_data_notification_Handler::eventInfo', sprintf(_CORE_REMOVE_IN_VERSION, '1.4'));
    return icms_data_notification_Handler::eventInfo($category_name, $event_name);

}

CamelCaseParameterName

Since: 0.2

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

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $category_name is not named in camelCase.
Open

function &notificationEvents($category_name, $enabled_only, $module_id=null) {
    icms_core_Debug::setDeprecated('icms_data_notification_Handler::categoryEvents', sprintf(_CORE_REMOVE_IN_VERSION, '1.4'));
    return icms_data_notification_Handler::categoryEvents($category_name, $enabled_only, $module_id);

}

CamelCaseParameterName

Since: 0.2

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

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

Avoid variables with short names like $db. Configured minimum length is 3.
Open

    public $db;
Severity: Minor
Found in htdocs/install/class/dbmanager.php by phpmd

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 $s_tables is not named in camelCase.
Open

class db_manager {

    public $s_tables = array();
    public $f_tables = array();
    public $db;
Severity: Minor
Found in htdocs/install/class/dbmanager.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

Avoid variables with short names like $fp. Configured minimum length is 3.
Open

        if ($fp = fopen('../modules/system/templates/'.$tplfile['file'], 'r')) {
Severity: Minor
Found in htdocs/install/makedata.php by phpmd

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

Avoid variables with short names like $i. Configured minimum length is 3.
Open

    $i=0; // sets auto increment for config values (incremented using $i++ after each value.)
Severity: Minor
Found in htdocs/install/makedata.php by phpmd

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 $_done_contami is not named in camelCase.
Open

class Protector {
    var $mydirname;
    var $_conn = null;
    var $_conf = array();
    var $_conf_serialized = '';

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 $_conf_serialized is not named in camelCase.
Open

class Protector {
    var $mydirname;
    var $_conn = null;
    var $_conf = array();
    var $_conf_serialized = '';

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 $_conn is not named in camelCase.
Open

class Protector {
    var $mydirname;
    var $_conn = null;
    var $_conf = array();
    var $_conf_serialized = '';

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 $_done_dotdot is not named in camelCase.
Open

class Protector {
    var $mydirname;
    var $_conn = null;
    var $_conf = array();
    var $_conf_serialized = '';

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 $_done_union is not named in camelCase.
Open

class Protector {
    var $mydirname;
    var $_conn = null;
    var $_conf = array();
    var $_conf_serialized = '';

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 $id. Configured minimum length is 3.
Open

function icms_collapsableBar($id = '', $title = '', $dsc = '') {
Severity: Minor
Found in htdocs/include/functions.php by phpmd

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

Avoid variables with short names like $b. Configured minimum length is 3.
Open

function div($a,$b) {
Severity: Minor
Found in htdocs/include/jalali.php by phpmd

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 parameter $module_id is not named in camelCase.
Open

function &notificationCategoryInfo($category_name='', $module_id=null) {
    icms_core_Debug::setDeprecated('icms_data_notification_Handler::categoryInfo', sprintf(_CORE_REMOVE_IN_VERSION, '1.4'));
    return icms_data_notification_Handler::categoryInfo();
}

CamelCaseParameterName

Since: 0.2

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

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

Avoid variables with short names like $b. Configured minimum length is 3.
Open

function protector_ip_cmp($a, $b) {

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 $filters_byconfig is not named in camelCase.
Open

class ProtectorFilterHandler {
    var $protector = null;
    var $filters_base = '';
    var $filters_byconfig = '';

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 $doubtful_requests is not named in camelCase.
Open

class ProtectorMySQLDatabase extends icms_db_legacy_mysql_Proxy {
    var $doubtful_requests = array ();
    var $doubtful_needles = array (
        // 'order by' ,
        'concat',

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 $cr. Configured minimum length is 3.
Open

        $cr = ICMS_URL;

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

Avoid variables with short names like $db. Configured minimum length is 3.
Open

    $db = icms_db_Factory::instance();
Severity: Minor
Found in htdocs/include/functions.php by phpmd

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

Severity
Category
Status
Source
Language