ImpressCMS/impresscms

View on GitHub

Showing 47,251 of 47,256 total issues

The parameter $perm_name is not named in camelCase.
Open

function xoops_groupperm_deletebymoditem($module_id, $perm_name, $item_id = null)
{
    // do not allow system permissions to be deleted
    if( (int) ($module_id) <= 1) {return false;}
    $gperm_handler = icms::handler('icms_member_groupperm');
Severity: Minor
Found in htdocs/include/functions.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 $b. Configured minimum length is 3.
Open

function impresscms_sort_adminmenu_modules($a, $b) {
Severity: Minor
Found in htdocs/include/cp_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 $a. Configured minimum length is 3.
Open

function impresscms_sort_adminmenu_modules($a, $b) {
Severity: Minor
Found in htdocs/include/cp_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

The parameter $item_id is not named in camelCase.
Open

function xoops_comment_delete($module_id, $item_id)
{
    if( (int) ($module_id) > 0 && (int) ($item_id) > 0)
    {
        $comment_handler = icms::handler('icms_data_comment');
Severity: Minor
Found in htdocs/include/functions.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 $m. Configured minimum length is 3.
Open

    $text = preg_replace_callback("'&#(\d+);'", function ($m) {
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

The parameter $module_id is not named in camelCase.
Open

function xoops_notification_deletebyitem ($module_id, $category, $item_id)
{
    $notification_handler =& icms::handler('icms_data_notification');
    return $notification_handler->unsubscribeByItem ($module_id, $category, $item_id);
}
Severity: Minor
Found in htdocs/include/functions.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 $db. Configured minimum length is 3.
Open

function getDbValue(&$db, $table, $field, $condition = '')
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 $m. Configured minimum length is 3.
Open

                    $m = $mod; // Getting info of the current module
Severity: Minor
Found in htdocs/include/cp_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

The parameter $item_id is not named in camelCase.
Open

function xoops_comment_count($module_id, $item_id = null)
{
    $comment_handler = icms::handler('icms_data_comment');
    $criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('com_modid', (int) ($module_id)));
    if(isset($item_id)) {$criteria->add(new icms_db_criteria_Item('com_itemid', (int) ($item_id)));}
Severity: Minor
Found in htdocs/include/functions.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 parameter $module_id is not named in camelCase.
Open

function xoops_notification_deletebymodule ($module_id)
{
    $notification_handler = icms::handler('icms_data_notification');
    return $notification_handler->unsubscribeByModule ($module_id);
}
Severity: Minor
Found in htdocs/include/functions.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 parameter $user_id is not named in camelCase.
Open

function xoops_notification_deletebyuser ($user_id)
{
    $notification_handler =& icms::handler('icms_data_notification');
    return $notification_handler->unsubscribeByUser ($user_id);
}
Severity: Minor
Found in htdocs/include/functions.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 $id. Configured minimum length is 3.
Open

function showNav($id = null, $separador = '/', $style="style='font-weight:bold'")
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

The parameter $module_id is not named in camelCase.
Open

function xoops_groupperm_deletebymoditem($module_id, $perm_name, $item_id = null)
{
    // do not allow system permissions to be deleted
    if( (int) ($module_id) <= 1) {return false;}
    $gperm_handler = icms::handler('icms_member_groupperm');
Severity: Minor
Found in htdocs/include/functions.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 parameter $module_basename is not named in camelCase.
Open

function &icms_getModuleHandler($name = null, $module_dir = null, $module_basename = null, $optional = false) {
    static $handlers;
    // if $module_dir is not specified
    if (!isset($module_dir)) {
        //if a module is loaded
Severity: Minor
Found in htdocs/include/functions.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 parameter $module_name is not named in camelCase.
Open

function icms_get_module_status($module_name){
    $module_handler = icms::handler('icms_module');
    $this_module = $module_handler->getByDirname($module_name);
    if($this_module && $this_module->getVar('isactive')){
        return true;
Severity: Minor
Found in htdocs/include/functions.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 parameter $month_id is not named in camelCase.
Open

function Icms_getMonthNameById($month_id) {
    global $icmsConfig;
    icms_loadLanguageFile('core', 'calendar');
    $month_id = icms_conv_local2nr($month_id);
    if( $icmsConfig['use_ext_date'] == true && defined ('_CALENDAR_TYPE') && _CALENDAR_TYPE == "jalali"){
Severity: Minor
Found in htdocs/include/functions.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 parameter $module_dir is not named in camelCase.
Open

function &icms_getModuleHandler($name = null, $module_dir = null, $module_basename = null, $optional = false) {
    static $handlers;
    // if $module_dir is not specified
    if (!isset($module_dir)) {
        //if a module is loaded
Severity: Minor
Found in htdocs/include/functions.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 parameter $j_y is not named in camelCase.
Open

function jalali_to_gregorian($j_y, $j_m, $j_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);

    $jy = $j_y-979;
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 parameter $module_id is not named in camelCase.
Open

function &notificationSubscribableCategoryInfo($module_id=null) {
    icms_core_Debug::setDeprecated('icms_data_notification_Handler::subscribableCategoryInfo', sprintf(_CORE_REMOVE_IN_VERSION, '1.4'));
    return icms_data_notification_Handler::subscribableCategoryInfo($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 property $db_pconnect is not named in camelCase.
Open

class setting_manager {

    var $database;
    var $dbhost;
    var $dbuname;

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

Severity
Category
Status
Source
Language