ImpressCMS/impresscms

View on GitHub

Showing 47,251 of 47,256 total issues

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

    $i=mktime($hour,$minute,$second,$month,$day,$year);
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 $enabled_only 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

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

function xoopsCodeTarea($textarea_id, $cols=60, $rows=15, $suffix=null)
{
    icms_core_Debug::setDeprecated('icms_form_elements_Dhtmltextarea.', sprintf(_CORE_REMOVE_IN_VERSION, '2.0'));
    $hiddentext = isset($suffix) ? 'xoopsHiddenText'.trim($suffix) : 'xoopsHiddenText';
    //Hack for url, email ...., the anchor is for having a link on [_More...]
Severity: Minor
Found in htdocs/include/xoopscodes.php by phpmd

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

function make_data(&$dbm, &$cm, $adminname, $adminlogin_name, $adminpass, $adminmail, $language, $gruops) {
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 $ci. Configured minimum length is 3.
Open

    $ci=1; // sets auto increment for configoption values (incremented using $ci++ 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

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

    $as = explode('.', $a);

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

function gregorian_to_jalali($g_y, $g_m, $g_d) {
    $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
    $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);

    $gy = $g_y-1600;
Severity: Minor
Found in htdocs/include/jalali.php by phpmd

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 property $_done_nullbyte 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_isocom 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 $no_php5 is not named in camelCase.
Open

class IcmsInstallWizard {
    public array $pages = array();
    public array $pagesNames = array();
    public array $pagesTitles = array();
    public array $titles = array();

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

    class XoopsGTicket {
        var $_errors = array ();
        var $_latest_token = '';
        var $messages = array ();

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

        $fp = @fopen($this->get_filepath4badips(), 'w');

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

            $fp = fopen($this->get_filepath4confighcache(), 'w');

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 $ip_matched_info 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 $_safe_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 class protector_crawler_overrun_message is not named in CamelCase.
Open

class protector_crawler_overrun_message extends ProtectorFilterAbstract {

    function execute() {
        // header( 'Location: http://google.com/' ) ; // redirect somewhere
        echo 'You have accessed too many times while short term'; // write any message as you like

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

Severity
Category
Status
Source
Language