apcal_coming_schedule_show_tpl accesses the super-global variable $GLOBALS. Open
function apcal_coming_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
apcal_coming_schedule_edit accesses the super-global variable $GLOBALS. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
Method apcal_coming_schedule_edit
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
The function apcal_coming_schedule_edit() has an NPath complexity of 384. The configured NPath complexity threshold is 200. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The function apcal_coming_schedule_edit() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
Avoid using undefined variables such as '$skin_folder' which will lead to PHP notices. Open
$cal->images_path = "$mod_path/assets/images/$skin_folder";
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$skin_folder' which will lead to PHP notices. Open
$cal->images_url = "$mod_url/assets/images/$skin_folder";
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$skin_folder' which will lead to PHP notices. Open
$cal->images_url = "$mod_url/assets/images/$skin_folder";
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$skin_folder' which will lead to PHP notices. Open
$cal->images_path = "$mod_path/assets/images/$skin_folder";
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Missing class import via use statement (line '93', column '35'). Open
$cal = new APCal_xoops(date('Y-n-j'), $xoopsConfig['language'], true);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '50', column '35'). Open
$cal = new APCal_xoops(date('Y-n-j'), $xoopsConfig['language'], true);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid unused local variables such as '$xoopsDB'. Open
global $xoopsConfig, $xoopsDB;
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$xoopsDB'. Open
global $xoopsDB, $xoopsConfig;
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Line exceeds 120 characters; contains 163 characters Open
$ret .= _MB_APCAL_YES . " <input type='radio' name='options[3]' value='1'" . ($showPictures == 1 ? 'checked' : '') . " style='text-align:right;' /> ";
- Exclude checks
Line exceeds 120 characters; contains 162 characters Open
$ret .= _MB_APCAL_NO . " <input type='radio' name='options[3]' value='0'" . ($showPictures == 0 ? 'checked' : '') . " style='text-align:right;' /><br>\n";
- Exclude checks
Line exceeds 120 characters; contains 153 characters Open
$ret .= sprintf(_MB_APCAL_UNTILDAYS, "<input type='text' size='4' name='options[4]' value='$untildays' style='text-align:right;' />") . "<br>\n";
- Exclude checks
The variable $mod_path is not named in camelCase. Open
function apcal_coming_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_path is not named in camelCase. Open
function apcal_coming_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_path is not named in camelCase. Open
function apcal_coming_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_path is not named in camelCase. Open
function apcal_coming_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_url is not named in camelCase. Open
function apcal_coming_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skin_folder is not named in camelCase. Open
function apcal_coming_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $now_cid is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skin_folder is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skin_folder is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_url is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $cat_title4show is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_url is not named in camelCase. Open
function apcal_coming_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_path is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $now_cid is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $depth_desc is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $skin_folder is not named in camelCase. Open
function apcal_coming_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_path is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $cat_title4show is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_url is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $now_cid is not named in camelCase. Open
function apcal_coming_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_path is not named in camelCase. Open
function apcal_coming_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_path is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_url is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $now_cid is not named in camelCase. Open
function apcal_coming_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_path is not named in camelCase. Open
function apcal_coming_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_path is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_url is not named in camelCase. Open
function apcal_coming_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_path is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_path is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mod_url is not named in camelCase. Open
function apcal_coming_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $depth_desc is not named in camelCase. Open
function apcal_coming_schedule_edit($options)
{
global $xoopsDB, $xoopsConfig;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}