The class QListControl has an overall complexity of 89 which is very high. The configured complexity threshold is 50. Open
abstract class QListControl extends QControl {
use QListItemManager;
/** @var null|QListItemStyle The common style for all elements in the list */
- Exclude checks
Function SetSelectedItemsByValue
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function SetSelectedItemsByValue(array $mixValueArray, $blnRefresh = true) {
$intCount = $this->GetItemCount();
for ($intIndex = 0; $intIndex < $intCount; $intIndex++) {
$objItem = $this->GetItem($intIndex);
- 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
Method __get
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __get($strName) {
switch ($strName) {
case "ItemCount":
return $this->GetItemCount();
File QListControl.class.php
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file contains the QListControl class.
*
* @package Controls
Method __set
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
switch ($strName) {
case "SelectedIndex":
try {
$mixValue = QType::Cast($mixValue, QType::Integer);
Function __get
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function __get($strName) {
switch ($strName) {
case "ItemCount":
return $this->GetItemCount();
- 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 __set
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function __set($strName, $mixValue) {
switch ($strName) {
case "SelectedIndex":
try {
$mixValue = QType::Cast($mixValue, QType::Integer);
- 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 AddItems
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function AddItems(array $mixItemArray, $mixSelectedValues = null, $strItemGroup = null, $mixOverrideParameters = null) {
try {
$mixItemArray = QType::Cast($mixItemArray, QType::ArrayType);
} catch (QInvalidCastException $objExc) {
$objExc->IncrementOffset();
- 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
Method AddItem
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function AddItem($mixListItemOrName, $strValue = null, $blnSelected = null, $strItemGroup = null, $mixOverrideParameters = null) {
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return $strNamesArray;
Avoid too many return
statements within this method. Open
return $objItem->Name;
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return $objItem;
Avoid too many return
statements within this method. Open
return $this->GetItem (0);
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return $values;
Avoid too many return
statements within this method. Open
return parent::__get($strName);
Avoid too many return
statements within this method. Open
return $this->GetSelectedItems();
Avoid too many return
statements within this method. Open
return $mixValues;
Avoid too many return
statements within this method. Open
return $objItem->Value;
Avoid too many return
statements within this method. Open
return $this->objItemStyle;
Avoid too many return
statements within this method. Open
return null;
The method __get() has a Cyclomatic Complexity of 23. The configured cyclomatic complexity threshold is 10. Open
public function __get($strName) {
switch ($strName) {
case "ItemCount":
return $this->GetItemCount();
- 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 SetSelectedItemsByValue() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10. Open
public function SetSelectedItemsByValue(array $mixValueArray, $blnRefresh = true) {
$intCount = $this->GetItemCount();
for ($intIndex = 0; $intIndex < $intCount; $intIndex++) {
$objItem = $this->GetItem($intIndex);
- 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 __set() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10. Open
public function __set($strName, $mixValue) {
switch ($strName) {
case "SelectedIndex":
try {
$mixValue = QType::Cast($mixValue, QType::Integer);
- 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
Missing class import via use statement (line '372', column '17'). Open
throw new QIndexOutOfRangeException($mixValue, "SelectedIndex");
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method UnselectAllItems has a boolean flag argument $blnRefresh, which is a certain sign of a Single Responsibility Principle violation. Open
public function UnselectAllItems($blnRefresh = true) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method SetSelectedItemsByIndex has a boolean flag argument $blnRefresh, which is a certain sign of a Single Responsibility Principle violation. Open
public function SetSelectedItemsByIndex(array $intIndexArray, $blnRefresh = true) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method SetSelectedItemsByName has a boolean flag argument $blnRefresh, which is a certain sign of a Single Responsibility Principle violation. Open
public function SetSelectedItemsByName(array $strNameArray, $blnRefresh = true) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method SetSelectedItemsByValue has a boolean flag argument $blnRefresh, which is a certain sign of a Single Responsibility Principle violation. Open
public function SetSelectedItemsByValue(array $mixValueArray, $blnRefresh = true) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '436', column '9'). Open
new QModelConnectorParam (QModelConnectorParam::GeneralCategory, 'NoAutoLoad', 'Prevent automatically populating a list type control. Set this if you are doing more complex list loading.', QType::Boolean)
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method SetSelectedItemsById has a boolean flag argument $blnRefresh, which is a certain sign of a Single Responsibility Principle violation. Open
public function SetSelectedItemsById(array $strIdArray, $blnRefresh = true) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '42', column '24'). Open
$objListItem = new QListItem($mixListItemOrName, $strValue, $blnSelected, $strItemGroup, $mixOverrideParameters);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '45', column '24'). Open
$objListItem = new QListItem($mixListItemOrName, $strValue, $blnSelected, $strItemGroup);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid using static access to class 'QType' in method '__set'. Open
$this->objItemStyle = QType::Cast($mixValue, "QListItemStyle");
- 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 'QType' in method 'AddItems'. Open
$mixItemArray = QType::Cast($mixItemArray, QType::ArrayType);
- 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 AddItem uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
$objListItem = new QListItem($mixListItemOrName, $strValue, $blnSelected, $strItemGroup);
}
- 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 AddItems uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$blnSelected = ($val === $mixSelectedValues); // differentiate between null and 0 values
}
- 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 'QType' in method 'AddItem'. Open
$objListItem = QType::Cast($mixListItemOrName, "QListItem");
- 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 'QType' in method '__set'. Open
$mixValue = QType::Cast($mixValue, QType::ArrayType);
- 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 assigning values to variables in if clauses and the like (line '302', column '10'). Open
public function __get($strName) {
switch ($strName) {
case "ItemCount":
return $this->GetItemCount();
- 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 '308', column '10'). Open
public function __get($strName) {
switch ($strName) {
case "ItemCount":
return $this->GetItemCount();
- 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 'QType' in method '__set'. Open
$mixValues = QType::Cast($mixValue, QType::ArrayType);
- 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 assigning values to variables in if clauses and the like (line '295', column '10'). Open
public function __get($strName) {
switch ($strName) {
case "ItemCount":
return $this->GetItemCount();
- 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 'QType' in method '__set'. Open
$mixValue = QType::Cast($mixValue, QType::Integer);
- 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 excessively long variable names like $mixOverrideParameters. Keep variable name length under 20. Open
public function AddItem($mixListItemOrName, $strValue = null, $blnSelected = null, $strItemGroup = null, $mixOverrideParameters = null) {
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid excessively long variable names like $mixOverrideParameters. Keep variable name length under 20. Open
public function AddItems(array $mixItemArray, $mixSelectedValues = null, $strItemGroup = null, $mixOverrideParameters = null) {
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
The method AddItem is not named in camelCase. Open
public function AddItem($mixListItemOrName, $strValue = null, $blnSelected = null, $strItemGroup = null, $mixOverrideParameters = null) {
if (gettype($mixListItemOrName) == QType::Object) {
$objListItem = QType::Cast($mixListItemOrName, "QListItem");
}
elseif ($mixOverrideParameters) {
- 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 SetSelectedItemsByValue is not named in camelCase. Open
public function SetSelectedItemsByValue(array $mixValueArray, $blnRefresh = true) {
$intCount = $this->GetItemCount();
for ($intIndex = 0; $intIndex < $intCount; $intIndex++) {
$objItem = $this->GetItem($intIndex);
- 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 UnselectAllItems is not named in camelCase. Open
public function UnselectAllItems($blnRefresh = true) {
$intCount = $this->GetItemCount();
for ($intIndex = 0; $intIndex < $intCount; $intIndex++) {
$objItem = $this->GetItem($intIndex);
$objItem->Selected = 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 SetSelectedItemsByIndex is not named in camelCase. Open
public function SetSelectedItemsByIndex(array $intIndexArray, $blnRefresh = true) {
$intCount = $this->GetItemCount();
for ($intIndex = 0; $intIndex < $intCount; $intIndex++) {
$objItem = $this->GetItem($intIndex);
$objItem->Selected = in_array($intIndex, $intIndexArray);
- 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 AddItems is not named in camelCase. Open
public function AddItems(array $mixItemArray, $mixSelectedValues = null, $strItemGroup = null, $mixOverrideParameters = null) {
try {
$mixItemArray = QType::Cast($mixItemArray, QType::ArrayType);
} catch (QInvalidCastException $objExc) {
$objExc->IncrementOffset();
- 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 GetModelConnectorParams is not named in camelCase. Open
public static function GetModelConnectorParams() {
return array_merge(parent::GetModelConnectorParams(), array(
new QModelConnectorParam (QModelConnectorParam::GeneralCategory, 'NoAutoLoad', 'Prevent automatically populating a list type control. Set this if you are doing more complex list loading.', QType::Boolean)
));
}
- 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 GetFirstSelectedItem is not named in camelCase. Open
public function GetFirstSelectedItem() {
$intCount = $this->GetItemCount();
for ($intIndex = 0; $intIndex < $intCount; $intIndex++) {
$objItem = $this->GetItem($intIndex);
if ($objItem->Selected) {
- 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 GetState is not named in camelCase. Open
public function GetState(){
return array('SelectedValues'=>$this->SelectedValues);
}
- 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 SetSelectedItemsById is not named in camelCase. Open
public function SetSelectedItemsById(array $strIdArray, $blnRefresh = true) {
$intCount = $this->GetItemCount();
for ($intIndex = 0; $intIndex < $intCount; $intIndex++) {
$objItem = $this->GetItem($intIndex);
$strId = $objItem->GetId();
- 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 RefreshSelection is not named in camelCase. Open
protected function RefreshSelection() {
$this->MarkAsModified();
}
- 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 SetSelectedItemsByName is not named in camelCase. Open
public function SetSelectedItemsByName(array $strNameArray, $blnRefresh = true) {
$intCount = $this->GetItemCount();
for ($intIndex = 0; $intIndex < $intCount; $intIndex++) {
$objItem = $this->GetItem($intIndex);
$strName = $objItem->Name;
- 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 PutState is not named in camelCase. Open
public function PutState($state) {
if (!empty($state['SelectedValues'])) {
$this->SelectedValues = $state['SelectedValues'];
}
}
- 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 GetSelectedItems is not named in camelCase. Open
public function GetSelectedItems() {
$aResult = array();
$intCount = $this->GetItemCount();
for ($intIndex = 0; $intIndex < $intCount; $intIndex++) {
$objItem = $this->GetItem($intIndex);
- 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 GetId is not named in camelCase. Open
public function GetId() {
return $this->strControlId;
}
- 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() {
}
}