XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

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

            $rs             = $GLOBALS['xoopsDB']->query("SELECT DISTINCT unique_id FROM $this->table WHERE ($whr_term) AND ($whr_categories) AND ($whr_class) AND (allday & 2) LIMIT 4");
Severity: Minor
Found in class/APCal.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 $get_target is not named in camelCase.
Open

        public function get_daily($get_target = '', $query_string = '', $for_print = false)
        {
            // $PHP_SELF = $_SERVER['SCRIPT_NAME'] ;
            // if( $get_target == '' ) $get_target = $PHP_SELF ;

Severity: Minor
Found in class/APCal.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 $get_target is not named in camelCase.
Open

        public function get_weekly_html($get_target = '')
        {
            $roimage = XOOPS_URL . '/modules/apcal/assets/images/regonline/regonline.png'; // added by goffy: image for online registration
            $ret     = "
     <table border='0' cellspacing='0' cellpadding='0' width='100%' style='border-collapse:collapse;margin:0px;'>
Severity: Minor
Found in class/APCal.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 $get_target is not named in camelCase.
Open

        public function get_weekly($get_target = '', $query_string = '', $for_print = false)
        {
            // $PHP_SELF = $_SERVER['SCRIPT_NAME'] ;
            // if( $get_target == '' ) $get_target = $PHP_SELF ;

Severity: Minor
Found in class/APCal.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 $ok. Configured minimum length is 3.
Open

                    $ok = false;
Severity: Minor
Found in class/APCal.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 $for_print is not named in camelCase.
Open

        public function get_daily($get_target = '', $query_string = '', $for_print = false)
        {
            // $PHP_SELF = $_SERVER['SCRIPT_NAME'] ;
            // if( $get_target == '' ) $get_target = $PHP_SELF ;

Severity: Minor
Found in class/APCal.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 $get_target is not named in camelCase.
Open

        public function get_daily_html($get_target = '')
        {
            $roimage = XOOPS_URL . '/modules/apcal/assets/images/regonline/regonline.png'; // added by goffy: image for online registration
            // get the result of plugins
            $plugin_returns = array();
Severity: Minor
Found in class/APCal.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 $event_id is not named in camelCase.
Open

        public function savepictures($event_id)
        {
            xoops_load('xoopsmediauploader');
            $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH . '/apcal', array(
                'image/gif',
Severity: Minor
Found in class/APCal.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 $for_print is not named in camelCase.
Open

        public function get_schedule_view_html($for_print = false)
        {
            global $xoopsTpl;

            $smode     = empty($_GET['smode']) ? 'Monthly' : preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['smode']);
Severity: Minor
Found in class/APCal.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

                $db       = XoopsDatabaseFactory::getDatabaseConnection();
Severity: Minor
Found in class/APCal.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 $d. Configured minimum length is 3.
Open

                $d          = $this->get_long_ymdn($event->start + ($h[0] * 3600 * 24) + $tzoffset);
Severity: Minor
Found in class/APCal.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 $db. Configured minimum length is 3.
Open

                $db       = XoopsDatabaseFactory::getDatabaseConnection();
Severity: Minor
Found in class/APCal.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 $h. Configured minimum length is 3.
Open

                $h          = array(
Severity: Minor
Found in class/APCal.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 $set_sql_append is not named in camelCase.
Open

        public function update_schedule($set_sql_append = '', $whr_sql_append = '', $notify_callback = null)
        {
            if ($_POST['summary'] === '') {
                $_POST['summary'] = _APCAL_MB_NOSUBJECT;
            }
Severity: Minor
Found in class/APCal.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 $whr_sql_append is not named in camelCase.
Open

        public function delete_schedule($whr_sql_append = '', $eval_after = null)
        {
            if (!empty($_POST['event_id'])) {
                $event_id = (int)$_POST['event_id'];

Severity: Minor
Found in class/APCal.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 $eval_after is not named in camelCase.
Open

        public function delete_schedule($whr_sql_append = '', $eval_after = null)
        {
            if (!empty($_POST['event_id'])) {
                $event_id = (int)$_POST['event_id'];

Severity: Minor
Found in class/APCal.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 $rs. Configured minimum length is 3.
Open

                $rs = $GLOBALS['xoopsDB']->query("SELECT rrule_pid FROM $this->table WHERE id='$event_id' $whr_sql_append");
Severity: Minor
Found in class/APCal.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 $whr_sql_append is not named in camelCase.
Open

        public function update_schedule($set_sql_append = '', $whr_sql_append = '', $notify_callback = null)
        {
            if ($_POST['summary'] === '') {
                $_POST['summary'] = _APCAL_MB_NOSUBJECT;
            }
Severity: Minor
Found in class/APCal.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 $rs. Configured minimum length is 3.
Open

                $rs = $GLOBALS['xoopsDB']->query("SELECT rrule_pid FROM $this->table WHERE id='$event_id' $whr_sql_append");
Severity: Minor
Found in class/APCal.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 $id. Configured minimum length is 3.
Open

                        $id = $event->rrule_pid;
Severity: Minor
Found in class/APCal.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