Method Init
has 219 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
File examples.inc.php
has 487 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class Examples {
public static $Categories = array();
public static $AdditionalCode = array();
public static $PluginExamples = array();
Function PageLinks
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public static function PageLinks() {
$strPrevious = null;
$strNext = null;
$blnFound = false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function Init
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function CodeLinks
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public static function CodeLinks($strCategoryId, $strExampleId, $strSubId, $strCurrentScript) {
$blnIsScript = false;
$strReference = Examples::GetExampleScriptPath($strCategoryId, $strExampleId, $strSubId);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
The class Examples has an overall complexity of 82 which is very high. The configured complexity threshold is 50. Open
class Examples {
public static $Categories = array();
public static $AdditionalCode = array();
public static $PluginExamples = array();
public static $PluginAdditions = array();
- Exclude checks
Method CodeLinks
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function CodeLinks($strCategoryId, $strExampleId, $strSubId, $strCurrentScript) {
$blnIsScript = false;
$strReference = Examples::GetExampleScriptPath($strCategoryId, $strExampleId, $strSubId);
Method PageLinks
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function PageLinks() {
$strPrevious = null;
$strNext = null;
$blnFound = false;
Function GetExampleId
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function GetExampleId() {
for ($intCategoryIndex = 0; $intCategoryIndex < count(Examples::$Categories); $intCategoryIndex++) {
$objExampleCategory = Examples::$Categories[$intCategoryIndex];
for ($intExampleIndex = 0; $intExampleIndex < count($objExampleCategory); $intExampleIndex++) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function PageName
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function PageName($strReference = null) {
if (is_null($strReference))
$strReference = QApplication::$ScriptName;
foreach (Examples::$Categories as $objExampleCategory)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function GetCategoryId
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function GetCategoryId() {
$numCategories = count(Examples::$Categories);
$categories = Examples::$Categories;
for ($intCategoryIndex = 0; $intCategoryIndex < count(Examples::$Categories); $intCategoryIndex++) {
$objExampleCategory = Examples::$Categories[$intCategoryIndex];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function PageLinkName
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function PageLinkName($strReference = null) {
if (is_null($strReference))
$strReference = QApplication::$ScriptName;
foreach (Examples::$Categories as $objExampleCategory)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function GetPluginFile
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function GetPluginFile() {
if ($offset = strpos (QApplicationBase::$ScriptFilename, '/plugin/')) {
$offset += strlen ('/plugin/');
$endoffset = strpos (QApplicationBase::$ScriptFilename, '/', $offset);
$strCat = substr (QApplicationBase::$ScriptFilename, $offset, $endoffset - $offset);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid deeply nested control flow statements. Open
if (file_exists ($strExamplePath)) {
self::AddPluginExampleFile($dirName, $strExample);
if (!empty($composerDetails['extra']['exampleExtras'][$strExample])) {
self::AddPluginExtraFile($dirName, $strExample, $composerDetails['extra']['exampleExtras'][$strExample]);
}
The method Init() has 250 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- Exclude checks
The method PageLinks() has an NPath complexity of 648. The configured NPath complexity threshold is 200. Open
public static function PageLinks() {
$strPrevious = null;
$strNext = null;
$blnFound = false;
- 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 method CodeLinks() has an NPath complexity of 3456. The configured NPath complexity threshold is 200. Open
public static function CodeLinks($strCategoryId, $strExampleId, $strSubId, $strCurrentScript) {
$blnIsScript = false;
$strReference = Examples::GetExampleScriptPath($strCategoryId, $strExampleId, $strSubId);
- 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 method Init() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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
The method PageLinks() has a Cyclomatic Complexity of 16. The configured cyclomatic complexity threshold is 10. Open
public static function PageLinks() {
$strPrevious = null;
$strNext = null;
$blnFound = false;
- 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
The method CodeLinks() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10. Open
public static function CodeLinks($strCategoryId, $strExampleId, $strSubId, $strCurrentScript) {
$blnIsScript = false;
$strReference = Examples::GetExampleScriptPath($strCategoryId, $strExampleId, $strSubId);
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex] = array();
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['name'] = 'Plugin System';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['description'] = 'An introduction to QForms and QControls';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex] = array();
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['description'] = 'A look at how to AJAX-enable your QForms';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['name'] = 'Paginated Controls';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['name'] = 'Advanced Controls Manipulation';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['name'] = 'Basic CodeGen';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['description'] = 'Looking more in depth at the capabilities of the QEvent and QAction libraries';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['name'] = 'More About the Object Relational Model';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex] = array();
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex] = array();
- 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 '$PluginExamples' which will lead to PHP notices. Open
Examples::$PluginExamples[$strPluginName][] = $strExampleFileName;
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['name'] = 'Basic AJAX in QForms';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['description'] = 'The QHtmlTable, QDataGrid and QDataRepeater controls';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['description'] = 'Dynamically creating controls, Implementing custom controls';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['name'] = 'Advanced AJAX';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['name'] = 'Other Tidbits';
- 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 '$PluginAdditions' which will lead to PHP notices. Open
Examples::$PluginAdditions[$strPluginName][$strExampleFileName] = $extras;
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['description'] = 'An introduction to the QCubed Code Generator';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex] = array();
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex] = array();
- 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 '$AdditionalCode' which will lead to PHP notices. Open
Examples::$AdditionalCode[__VIRTUAL_DIRECTORY__ . __EXAMPLES__ . '/advanced_ajax/dialog_box.php'] = array('CalculatorWidget.class.php','CalculatorWidget.tpl.php');
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['name'] = 'Other Advanced Controls';
- 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 '$AdditionalCode' which will lead to PHP notices. Open
Examples::$AdditionalCode[__VIRTUAL_DIRECTORY__ . __EXAMPLES__ . '/code_generator/script_path.php'] = array('mysql_myisam.sql', 'relationships.txt');
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex] = array();
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex] = array();
- 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 '$AdditionalCode' which will lead to PHP notices. Open
Examples::$AdditionalCode[__VIRTUAL_DIRECTORY__ . __EXAMPLES__ . '/master_detail/project_list.php'] = array(
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['name'] = 'Model Connectors, DataGrid Connectors, and the Drafts';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex] = array();
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex] = array();
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['description'] = 'Infrastructure that lets the community extend QCubed';
- 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 '$Categories' which will lead to PHP notices. Open
array_push(Examples::$Categories[$intIndex], __VIRTUAL_DIRECTORY__ . __EXAMPLES__ . $strExampleFileName);
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['name'] = 'Basic QForms';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['description'] = 'Advanced AJAX functionality like drag and drop, selection and cinematic effects';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['description'] = 'A collection of examples for some of the more advanced/complex QControls';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['description'] = 'Combining the Code Generator with the QForm Library';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['name'] = 'Beyond HTML';
- 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 '$AdditionalCode' which will lead to PHP notices. Open
Examples::$AdditionalCode[__VIRTUAL_DIRECTORY__ . __EXAMPLES__ . '/code_generator/intro.php'] = array('mysql_innodb.sql','sql_server.sql');
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex] = array();
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['description'] = 'Ad Hoc Queries, Custom Load Methods, and QCubed Query';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['description'] = 'Other random examples, samples and tutorials';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['name'] = 'Querying in QCubed';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex] = array();
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex] = array();
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['description'] = 'Looking more in depth at the functionality of the generated ORM';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['name'] = 'More About Events and Actions';
- 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 '$AdditionalCode' which will lead to PHP notices. Open
Examples::$AdditionalCode[__VIRTUAL_DIRECTORY__ . __EXAMPLES__ . '/datarepeater/ajax.php'] = array('dtr_persons.tpl.php');
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex]['description'] = 'Other libraries in QCubed, including support for Email and RSS';
- 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 '$Categories' which will lead to PHP notices. Open
Examples::$Categories[$intIndex] = array();
- 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 '$Categories' which will lead to PHP notices. Open
$strExample = Examples::$Categories[$mixCategoryId][$mixExampleId];
- 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 '$PluginExamples' which will lead to PHP notices. Open
if (!empty(Examples::$PluginExamples[$strCat])) {
- 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 '$PluginExamples' which will lead to PHP notices. Open
$strExample = Examples::$PluginExamples[$mixExampleId][0];
- 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 '$PluginAdditions' which will lead to PHP notices. Open
$extraFiles = Examples::$PluginAdditions[$strExampleId][$strSubId];
- 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 '$PluginExamples' which will lead to PHP notices. Open
if (!empty(Examples::$PluginExamples[$strCat])) {
- 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 '$Categories' which will lead to PHP notices. Open
$strExample = Examples::$Categories[$mixCategoryId][$mixExampleId];
- 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 '$PluginAdditions' which will lead to PHP notices. Open
if (!empty(Examples::$PluginAdditions[$strExampleId][$strSubId])) {
- 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 '$PluginExamples' which will lead to PHP notices. Open
for ($intExampleIndex = 0; $intExampleIndex < count(Examples::$PluginExamples[$strCat]); $intExampleIndex++) {
- 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 '$PluginExamples' which will lead to PHP notices. Open
if (Examples::$PluginExamples[$strCat][$intExampleIndex] == $strCurFile) {
- 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 '$AdditionalCode' which will lead to PHP notices. Open
Examples::$AdditionalCode[__VIRTUAL_DIRECTORY__ . __EXAMPLES__ . $strExampleFileName] = $mixReferencedFile;
- 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 assigning values to variables in if clauses and the like (line '328', column '8'). Open
public static function GetExampleId() {
for ($intCategoryIndex = 0; $intCategoryIndex < count(Examples::$Categories); $intCategoryIndex++) {
$objExampleCategory = Examples::$Categories[$intCategoryIndex];
for ($intExampleIndex = 0; $intExampleIndex < count($objExampleCategory); $intExampleIndex++) {
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid using static access to class 'QHtml' in method 'PageLinks'. Open
$strLink = QHtml::RenderLink(QHtml::MakeUrl(__DEVTOOLS_ASSETS__ . '/plugin_manager.php'), "Plugin Manager", ["class"=>"headerLink"]);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Examples' in method 'CodeLinks'. Open
$strReference = Examples::GetExampleScriptPath($strCategoryId, $strExampleId, $strSubId);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method CodeLinks uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$strToReturn .= sprintf('<a href="%s/../%s" class="headerLink">%s</a>', QApplication::$RequestUri, $strScriptname, $strScriptname);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'QHtml' in method 'PageLinks'. Open
$strLink = QHtml::RenderLink(QHtml::MakeUrl(__DEVTOOLS_ASSETS__ . '/plugin_manager.php'), "Plugin Manager", ["class"=>"headerLink"]);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'QApplication' in method 'CodeLinks'. Open
QApplication::CloseWindow();
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Examples' in method 'PageLinks'. Open
$intCategoryId = Examples::GetCategoryId();
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method PageLinks uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$strPrevious = sprintf('<strong><a href="%s" class="headerLink"><< %s</a></strong>',
$strScriptName, $strDescription);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method CodeLinks uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$strToReturn .= sprintf('<a href="%s/../footer.inc.php" class="headerLink">footer.inc.php</a>', QApplication::$RequestUri);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid assigning values to variables in if clauses and the like (line '299', column '8'). Open
public static function GetCategoryId() {
$numCategories = count(Examples::$Categories);
$categories = Examples::$Categories;
for ($intCategoryIndex = 0; $intCategoryIndex < count(Examples::$Categories); $intCategoryIndex++) {
$objExampleCategory = Examples::$Categories[$intCategoryIndex];
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid assigning values to variables in if clauses and the like (line '343', column '8'). Open
public static function GetPluginFile() {
if ($offset = strpos (QApplicationBase::$ScriptFilename, '/plugin/')) {
$offset += strlen ('/plugin/');
$endoffset = strpos (QApplicationBase::$ScriptFilename, '/', $offset);
$strCat = substr (QApplicationBase::$ScriptFilename, $offset, $endoffset - $offset);
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
The method CodeLinks uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$strToReturn = sprintf('<a href="%s/../header.inc.php" class="headerLink">header.inc.php</a>', QApplication::$RequestUri);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method CodeLinks uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$strToReturn .= sprintf('<a href="%s/../%s" class="headerLink">%s</a>', QApplication::$RequestUri, $strScriptname, preg_replace('/__.*__/', '', $strScriptname));
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method CodeLinks uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
QApplication::CloseWindow();
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid unused local variables such as '$strScriptPath'. Open
$strScriptPath = substr($strExample, 0, $intPosition);
- 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 '$strScript'. Open
$strScript = QApplicationBase::$ScriptName;
- 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 '$qapp'. Open
$qapp = QApplication::$ScriptName;
- 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 '$categories'. Open
$categories = Examples::$Categories;
- 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 '$offset'. Open
if ($offset = strpos (QApplicationBase::$ScriptFilename, '/plugin/')) {
- 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 '$numCategories'. Open
$numCategories = count(Examples::$Categories);
- 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 '$strName'. Open
$strName = substr($strExample, $intPosition + 1);
- 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 using count() function in for loops. Open
for ($intExampleIndex = 0; $intExampleIndex < count($objExampleCategory); $intExampleIndex++) {
if (array_key_exists($intExampleIndex, $objExampleCategory)) {
$strExample = $objExampleCategory[$intExampleIndex];
$intPosition = strpos($strExample, ' ');
$strScriptPath = strtolower(substr($strExample, 0, $intPosition));
- Read upRead up
- Exclude checks
CountInLoopExpression
Since: 2.7.0
Using count/sizeof in loops expressions is considered bad practice and is a potential source of many bugs, especially when the loop manipulates an array, as count happens on each iteration.
Example
class Foo {
public function bar()
{
$array = array();
for ($i = 0; count($array); $i++) {
// ...
}
}
}
Source https://phpmd.org/rules/design.html#countinloopexpression
Avoid using count() function in for loops. Open
for ($intExampleIndex = 0; $intExampleIndex < count(Examples::$PluginExamples[$strCat]); $intExampleIndex++) {
if (Examples::$PluginExamples[$strCat][$intExampleIndex] == $strCurFile) {
return $strCurFile;
}
}
- Read upRead up
- Exclude checks
CountInLoopExpression
Since: 2.7.0
Using count/sizeof in loops expressions is considered bad practice and is a potential source of many bugs, especially when the loop manipulates an array, as count happens on each iteration.
Example
class Foo {
public function bar()
{
$array = array();
for ($i = 0; count($array); $i++) {
// ...
}
}
}
Source https://phpmd.org/rules/design.html#countinloopexpression
Avoid using count() function in for loops. Open
for ($intCategoryIndex = 0; $intCategoryIndex < count(Examples::$Categories); $intCategoryIndex++) {
$objExampleCategory = Examples::$Categories[$intCategoryIndex];
for ($intExampleIndex = 0; $intExampleIndex < count($objExampleCategory); $intExampleIndex++) {
if (array_key_exists($intExampleIndex, $objExampleCategory)) {
- Read upRead up
- Exclude checks
CountInLoopExpression
Since: 2.7.0
Using count/sizeof in loops expressions is considered bad practice and is a potential source of many bugs, especially when the loop manipulates an array, as count happens on each iteration.
Example
class Foo {
public function bar()
{
$array = array();
for ($i = 0; count($array); $i++) {
// ...
}
}
}
Source https://phpmd.org/rules/design.html#countinloopexpression
Avoid using count() function in for loops. Open
for ($intCategoryIndex = 0; $intCategoryIndex < count(Examples::$Categories); $intCategoryIndex++) {
$objExampleCategory = Examples::$Categories[$intCategoryIndex];
for ($intExampleIndex = 0; $intExampleIndex < count($objExampleCategory); $intExampleIndex++) {
if (array_key_exists($intExampleIndex, $objExampleCategory)) {
- Read upRead up
- Exclude checks
CountInLoopExpression
Since: 2.7.0
Using count/sizeof in loops expressions is considered bad practice and is a potential source of many bugs, especially when the loop manipulates an array, as count happens on each iteration.
Example
class Foo {
public function bar()
{
$array = array();
for ($i = 0; count($array); $i++) {
// ...
}
}
}
Source https://phpmd.org/rules/design.html#countinloopexpression
Avoid using count() function in for loops. Open
for ($intExampleIndex = 0; $intExampleIndex < count($objExampleCategory); $intExampleIndex++) {
if (array_key_exists($intExampleIndex, $objExampleCategory)) {
$strExample = $objExampleCategory[$intExampleIndex];
$intPosition = strpos($strExample, ' ');
$strScriptPath = substr($strExample, 0, $intPosition);
- Read upRead up
- Exclude checks
CountInLoopExpression
Since: 2.7.0
Using count/sizeof in loops expressions is considered bad practice and is a potential source of many bugs, especially when the loop manipulates an array, as count happens on each iteration.
Example
class Foo {
public function bar()
{
$array = array();
for ($i = 0; count($array); $i++) {
// ...
}
}
}
Source https://phpmd.org/rules/design.html#countinloopexpression
The variable $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $AdditionalCode is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $PluginAdditions is not named in camelCase. Open
public static function AddPluginExtraFile($strPluginName, $strExampleFileName, $extras) {
Examples::$PluginAdditions[$strPluginName][$strExampleFileName] = $extras;
}
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $AdditionalCode is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
private static function AddCoreExampleFile($intIndex, $strExampleFileName) {
array_push(Examples::$Categories[$intIndex], __VIRTUAL_DIRECTORY__ . __EXAMPLES__ . $strExampleFileName);
}
- 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 $AdditionalCode is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $AdditionalCode is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $PluginExamples is not named in camelCase. Open
public static function AddPluginExampleFile($strPluginName, $strExampleFileName) {
Examples::$PluginExamples[$strPluginName][] = $strExampleFileName;
}
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $PluginExamples is not named in camelCase. Open
public static function GetExampleId() {
for ($intCategoryIndex = 0; $intCategoryIndex < count(Examples::$Categories); $intCategoryIndex++) {
$objExampleCategory = Examples::$Categories[$intCategoryIndex];
for ($intExampleIndex = 0; $intExampleIndex < count($objExampleCategory); $intExampleIndex++) {
- 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 $AdditionalCode is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $Categories is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- 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 $AdditionalCode is not named in camelCase. Open
private static function AddCoreReferencedFile($strExampleFileName, $mixReferencedFile) {
if (!is_array($mixReferencedFile)) {
$mixReferencedFile = array($mixReferencedFile);
}
Examples::$AdditionalCode[__VIRTUAL_DIRECTORY__ . __EXAMPLES__ . $strExampleFileName] = $mixReferencedFile;
- 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 $PluginExamples is not named in camelCase. Open
public static function GetPluginFile() {
if ($offset = strpos (QApplicationBase::$ScriptFilename, '/plugin/')) {
$offset += strlen ('/plugin/');
$endoffset = strpos (QApplicationBase::$ScriptFilename, '/', $offset);
$strCat = substr (QApplicationBase::$ScriptFilename, $offset, $endoffset - $offset);
- 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 $PluginExamples is not named in camelCase. Open
public static function GetExampleName($mixCategoryId, $mixExampleId) {
if ($mixCategoryId == 'plugin') {
$strExample = Examples::$PluginExamples[$mixExampleId][0];
return $strExample;
}
- 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 $PluginExamples is not named in camelCase. Open
public static function GetPluginFile() {
if ($offset = strpos (QApplicationBase::$ScriptFilename, '/plugin/')) {
$offset += strlen ('/plugin/');
$endoffset = strpos (QApplicationBase::$ScriptFilename, '/', $offset);
$strCat = substr (QApplicationBase::$ScriptFilename, $offset, $endoffset - $offset);
- 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 $Categories is not named in camelCase. Open
public static function GetCategoryId() {
$numCategories = count(Examples::$Categories);
$categories = Examples::$Categories;
for ($intCategoryIndex = 0; $intCategoryIndex < count(Examples::$Categories); $intCategoryIndex++) {
$objExampleCategory = Examples::$Categories[$intCategoryIndex];
- 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 $Categories is not named in camelCase. Open
public static function GetExampleId() {
for ($intCategoryIndex = 0; $intCategoryIndex < count(Examples::$Categories); $intCategoryIndex++) {
$objExampleCategory = Examples::$Categories[$intCategoryIndex];
for ($intExampleIndex = 0; $intExampleIndex < count($objExampleCategory); $intExampleIndex++) {
- 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 $PluginAdditions is not named in camelCase. Open
public static function CodeLinks($strCategoryId, $strExampleId, $strSubId, $strCurrentScript) {
$blnIsScript = false;
$strReference = Examples::GetExampleScriptPath($strCategoryId, $strExampleId, $strSubId);
- 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 $AdditionalCode is not named in camelCase. Open
public static function CodeLinks($strCategoryId, $strExampleId, $strSubId, $strCurrentScript) {
$blnIsScript = false;
$strReference = Examples::GetExampleScriptPath($strCategoryId, $strExampleId, $strSubId);
- 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 $PluginExamples is not named in camelCase. Open
public static function GetPluginFile() {
if ($offset = strpos (QApplicationBase::$ScriptFilename, '/plugin/')) {
$offset += strlen ('/plugin/');
$endoffset = strpos (QApplicationBase::$ScriptFilename, '/', $offset);
$strCat = substr (QApplicationBase::$ScriptFilename, $offset, $endoffset - $offset);
- 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 $Categories is not named in camelCase. Open
public static function GetExampleName($mixCategoryId, $mixExampleId) {
if ($mixCategoryId == 'plugin') {
$strExample = Examples::$PluginExamples[$mixExampleId][0];
return $strExample;
}
- 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 $Categories is not named in camelCase. Open
public static function GetExampleScriptPath($mixCategoryId, $mixExampleId, $mixSubId = null) {
if ($mixCategoryId == 'plugin') {
$strScriptPath = __PLUGIN_ASSETS__ . "/{$mixExampleId}/examples/{$mixSubId}";
return $strScriptPath;
}
- 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 $PluginAdditions is not named in camelCase. Open
public static function CodeLinks($strCategoryId, $strExampleId, $strSubId, $strCurrentScript) {
$blnIsScript = false;
$strReference = Examples::GetExampleScriptPath($strCategoryId, $strExampleId, $strSubId);
- 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 method AddPluginExampleFile is not named in camelCase. Open
public static function AddPluginExampleFile($strPluginName, $strExampleFileName) {
Examples::$PluginExamples[$strPluginName][] = $strExampleFileName;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method AddCoreReferencedFile is not named in camelCase. Open
private static function AddCoreReferencedFile($strExampleFileName, $mixReferencedFile) {
if (!is_array($mixReferencedFile)) {
$mixReferencedFile = array($mixReferencedFile);
}
Examples::$AdditionalCode[__VIRTUAL_DIRECTORY__ . __EXAMPLES__ . $strExampleFileName] = $mixReferencedFile;
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method AddCoreExampleFile is not named in camelCase. Open
private static function AddCoreExampleFile($intIndex, $strExampleFileName) {
array_push(Examples::$Categories[$intIndex], __VIRTUAL_DIRECTORY__ . __EXAMPLES__ . $strExampleFileName);
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method Init is not named in camelCase. Open
public static function Init() {
$intIndex = -1;
$intIndex++;
Examples::$Categories[$intIndex] = array();
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method AddPluginExtraFile is not named in camelCase. Open
public static function AddPluginExtraFile($strPluginName, $strExampleFileName, $extras) {
Examples::$PluginAdditions[$strPluginName][$strExampleFileName] = $extras;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method PageLinkName is not named in camelCase. Open
public static function PageLinkName($strReference = null) {
if (is_null($strReference))
$strReference = QApplication::$ScriptName;
foreach (Examples::$Categories as $objExampleCategory)
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method PageName is not named in camelCase. Open
public static function PageName($strReference = null) {
if (is_null($strReference))
$strReference = QApplication::$ScriptName;
foreach (Examples::$Categories as $objExampleCategory)
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method PageLinks is not named in camelCase. Open
public static function PageLinks() {
$strPrevious = null;
$strNext = null;
$blnFound = false;
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method GetExampleId is not named in camelCase. Open
public static function GetExampleId() {
for ($intCategoryIndex = 0; $intCategoryIndex < count(Examples::$Categories); $intCategoryIndex++) {
$objExampleCategory = Examples::$Categories[$intCategoryIndex];
for ($intExampleIndex = 0; $intExampleIndex < count($objExampleCategory); $intExampleIndex++) {
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method GetPluginFile is not named in camelCase. Open
public static function GetPluginFile() {
if ($offset = strpos (QApplicationBase::$ScriptFilename, '/plugin/')) {
$offset += strlen ('/plugin/');
$endoffset = strpos (QApplicationBase::$ScriptFilename, '/', $offset);
$strCat = substr (QApplicationBase::$ScriptFilename, $offset, $endoffset - $offset);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method CodeLinks is not named in camelCase. Open
public static function CodeLinks($strCategoryId, $strExampleId, $strSubId, $strCurrentScript) {
$blnIsScript = false;
$strReference = Examples::GetExampleScriptPath($strCategoryId, $strExampleId, $strSubId);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method GetExampleName is not named in camelCase. Open
public static function GetExampleName($mixCategoryId, $mixExampleId) {
if ($mixCategoryId == 'plugin') {
$strExample = Examples::$PluginExamples[$mixExampleId][0];
return $strExample;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method GetCategoryId is not named in camelCase. Open
public static function GetCategoryId() {
$numCategories = count(Examples::$Categories);
$categories = Examples::$Categories;
for ($intCategoryIndex = 0; $intCategoryIndex < count(Examples::$Categories); $intCategoryIndex++) {
$objExampleCategory = Examples::$Categories[$intCategoryIndex];
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method GetExampleScriptPath is not named in camelCase. Open
public static function GetExampleScriptPath($mixCategoryId, $mixExampleId, $mixSubId = null) {
if ($mixCategoryId == 'plugin') {
$strScriptPath = __PLUGIN_ASSETS__ . "/{$mixExampleId}/examples/{$mixSubId}";
return $strScriptPath;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}