The method _ci_load() contains an eval expression. Open
echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
- Read upRead up
- Exclude checks
EvalExpression
Since: 0.2
An eval-expression is untestable, a security risk and bad practice. Therefore it should be avoided. Consider to replace the eval-expression with regular code.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
eval('$param = 23;');
}
}
}
Source https://phpmd.org/rules/design.html#evalexpression
Function _autoloader
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function _autoloader($autoload)
{
$path = false;
if ($this->_module) {
- 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
File Loader.php
has 347 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php defined('BASEPATH') or exit('No direct script access allowed');
/**
* Modular Extensions - HMVC
*
The class MX_Loader has 20 public methods. Consider refactoring MX_Loader to keep number of public methods under 10. Open
class MX_Loader extends CI_Loader
{
protected $_module;
public $_ci_plugins = [];
- Read upRead up
- Exclude checks
TooManyPublicMethods
Since: 0.1
A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
Example
Source https://phpmd.org/rules/codesize.html#toomanypublicmethods
The class MX_Loader has an overall complexity of 114 which is very high. The configured complexity threshold is 50. Open
class MX_Loader extends CI_Loader
{
protected $_module;
public $_ci_plugins = [];
- Exclude checks
Function _ci_load
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 _autoloader
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _autoloader($autoload)
{
$path = false;
if ($this->_module) {
MX_Loader
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class MX_Loader extends CI_Loader
{
protected $_module;
public $_ci_plugins = [];
Method _ci_load
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
Function model
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function model($model, $object_name = null, $connect = false)
{
if (is_array($model)) {
return $this->models($model);
}
- 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 library
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
- 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 library
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
Method model
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function model($model, $object_name = null, $connect = false)
{
if (is_array($model)) {
return $this->models($model);
}
Method language
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function language($langfile, $idiom = '', $return = false, $add_suffix = true, $alt_path = '')
Function initialize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function initialize($controller = null)
{
// set the module name
$this->_module = CI::$APP->router->fetch_module();
- 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 plugin
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function plugin($plugin)
{
if (is_array($plugin)) {
return $this->plugins($plugin);
}
- 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 method _autoloader() has an NPath complexity of 587520. The configured NPath complexity threshold is 200. Open
public function _autoloader($autoload)
{
$path = false;
if ($this->_module) {
- 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 _ci_load() has an NPath complexity of 624. The configured NPath complexity threshold is 200. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 _ci_load() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 library() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10. Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
- 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 model() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10. Open
public function model($model, $object_name = null, $connect = false)
{
if (is_array($model)) {
return $this->models($model);
}
- 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 _autoloader() has a Cyclomatic Complexity of 28. The configured cyclomatic complexity threshold is 10. Open
public function _autoloader($autoload)
{
$path = false;
if ($this->_module) {
- 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 '$_ci_view' which will lead to PHP notices. Open
$_ci_file = pathinfo($_ci_view, PATHINFO_EXTENSION) ? $_ci_view : $_ci_view.EXT;
- 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 '$_ci_vars' which will lead to PHP notices. Open
if (isset($_ci_vars)) {
- 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 '$_ci_vars' which will lead to PHP notices. Open
$this->_ci_cached_vars = array_merge($this->_ci_cached_vars, (array) $_ci_vars);
- 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 '$_ci_view' which will lead to PHP notices. Open
$_ci_file = pathinfo($_ci_view, PATHINFO_EXTENSION) ? $_ci_view : $_ci_view.EXT;
- 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 '$_ci_return' which will lead to PHP notices. Open
if ($_ci_return === true) {
- 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 '$_ci_view' which will lead to PHP notices. Open
$_ci_file = pathinfo($_ci_view, PATHINFO_EXTENSION) ? $_ci_view : $_ci_view.EXT;
- 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 '$_ci_view' which will lead to PHP notices. Open
if (isset($_ci_view)) {
- 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
The method config has a boolean flag argument $use_sections, which is a certain sign of a Single Responsibility Principle violation. Open
public function config($file, $use_sections = false, $fail_gracefully = false)
- 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 database has a boolean flag argument $return, which is a certain sign of a Single Responsibility Principle violation. Open
public function database($params = '', $return = false, $query_builder = null)
- 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 config has a boolean flag argument $fail_gracefully, which is a certain sign of a Single Responsibility Principle violation. Open
public function config($file, $use_sections = false, $fail_gracefully = false)
- 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 model has a boolean flag argument $connect, which is a certain sign of a Single Responsibility Principle violation. Open
public function model($model, $object_name = null, $connect = false)
- 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 language has a boolean flag argument $return, which is a certain sign of a Single Responsibility Principle violation. Open
public function language($langfile, $idiom = '', $return = false, $add_suffix = true, $alt_path = '')
- 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 language has a boolean flag argument $add_suffix, which is a certain sign of a Single Responsibility Principle violation. Open
public function language($langfile, $idiom = '', $return = false, $add_suffix = true, $alt_path = '')
- 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 view has a boolean flag argument $return, which is a certain sign of a Single Responsibility Principle violation. Open
public function view($view, $vars = [], $return = false)
- 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
Remove error control operator '@' on line 585. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- Read upRead up
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
Avoid using static access to class 'Modules' in method 'helper'. Open
[$path, $_helper] = Modules::find($helper.'_helper', $this->_module, 'helpers/');
- 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 helper uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
[$path, $_helper] = Modules::find($helper.'_helper', $this->_module, 'helpers/');
}
- 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 'Modules' in method 'helper'. Open
list($path, $_helper) = Modules::find($helper.'_helper', $this->_module, 'helpers/');
- 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 initialize uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
parent::initialize();
// autoload module items
$this->_autoloader([]);
- 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 '93', column '24'). Open
public function _add_module_paths($module = '')
{
if (empty($module)) {
return;
}
- 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 'Modules' in method '_autoloader'. Open
list($path, $file) = Modules::find('autoload', $this->_module, 'config/');
- 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 '450', column '42'). Open
public function plugin($plugin)
{
if (is_array($plugin)) {
return $this->plugins($plugin);
}
- 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 'Modules' in method '_autoloader'. Open
[$path, $file] = Modules::find('autoload', $this->_module, 'config/');
- 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 'Modules' in method 'library'. Open
list($path, $_library) = Modules::find($library, $this->_module, 'libraries/');
- 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 'Modules' in method 'plugin'. Open
[$path, $_plugin] = Modules::find($plugin.'_pi', $this->_module, 'plugins/');
- 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 view uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
[$path, $_view] = Modules::find($view, $this->_module, 'views/');
}
- 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 'Modules' in method '_autoloader'. Open
$autoload = array_merge(Modules::load_file($file, $path, 'autoload'), $autoload);
- 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 'Modules' in method 'library'. Open
list($path2, $file) = Modules::find($_alias, $this->_module, 'config/');
- 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 library uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
Modules::load_file($_library, $path);
$library = ucfirst($_library);
CI::$APP->$_alias = new $library($params);
- 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 _autoloader uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
[$path, $file] = Modules::find('autoload', $this->_module, 'config/');
}
- 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 'Modules' in method 'module'. Open
CI::$APP->$_alias = Modules::load([$module => $params]);
- 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 'Modules' in method 'view'. Open
list($path, $_view) = Modules::find($view, $this->_module, 'views/');
- 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 'Modules' in method 'view'. Open
[$path, $_view] = Modules::find($view, $this->_module, 'views/');
- 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 plugin uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
[$path, $_plugin] = Modules::find($plugin.'_pi', $this->_module, 'plugins/');
}
- 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 '252', column '50'). Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
- 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 'Modules' in method 'library'. Open
Modules::load_file($_library, $path);
- 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 'Modules' in method 'helper'. Open
Modules::load_file($_helper, $path);
- 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 model uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
[$path, $_model] = Modules::find(strtolower($model), $this->_module, 'models/');
}
- 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 'Modules' in method 'plugin'. Open
list($path, $_plugin) = Modules::find($plugin.'_pi', $this->_module, 'plugins/');
- 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 'Modules' in method '_autoloader'. Open
[$path, $file] = Modules::find('constants', $this->_module, 'config/');
- 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 _ci_load uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
include($_ci_path);
}
- 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 '684', column '18'). Open
public function _autoloader($autoload)
{
$path = false;
if ($this->_module) {
- 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 library uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
[$path, $_library] = Modules::find($library, $this->_module, 'libraries/');
}
- 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 'Modules' in method 'library'. Open
$path2 && $params = Modules::load_file($file, $path2, 'config');
- 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 'Modules' in method 'model'. Open
list($path, $_model) = Modules::find(strtolower($model), $this->_module, 'models/');
- 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 'Modules' in method 'model'. Open
Modules::load_file($_model, $path);
- 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 'Modules' in method 'plugin'. Open
Modules::load_file($_plugin, $path);
- 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 'Modules' in method 'library'. Open
[$path, $_library] = Modules::find($library, $this->_module, 'libraries/');
- 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 '558', column '33'). Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 _autoloader uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
[$path, $file] = Modules::find('constants', $this->_module, 'config/');
}
- 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 library uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
[$path2, $file] = Modules::find($_alias, $this->_module, 'config/');
}
- 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 model uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
class_exists('CI_Model', false) or load_class('Model', 'core');
if ($connect !== false && ! class_exists('CI_DB', false)) {
if ($connect === true) {
- 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 'Modules' in method 'model'. Open
[$path, $_model] = Modules::find(strtolower($model), $this->_module, 'models/');
- 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 view uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return $this->_ci_load(['_ci_view' => $view, '_ci_vars' => $this->_ci_prepare_view_vars($vars), '_ci_return' => $return]);
}
- 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 _ci_load uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
CI::$APP->output->append_output(ob_get_clean());
}
- 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 'Modules' in method '_autoloader'. Open
list($path, $file) = Modules::find('constants', $this->_module, 'config/');
- 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 'Modules' in method 'library'. Open
[$path2, $file] = Modules::find($_alias, $this->_module, 'config/');
- 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 unused local variables such as '$offset'. Open
foreach (Modules::$locations as $location => $offset) {
- 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 '$val'. Open
foreach (get_class_vars('CI_Loader') as $var => $val) {
- 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 '$_alias'. Open
$_alias = strtolower(basename($module));
- 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 '$db'. Open
if (!$db = CI::$APP->config->item('database') && in_array('database', $autoload['libraries'])) {
- 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 parameters such as '$component'. Open
protected function &_ci_get_component($component)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused local variables such as '$_ci_return'. Open
if ($_ci_return === true) {
- 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
Reference to undeclared property \CI->load
Open
$this->$var =& CI::$APP->load->$var;
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method _add_module_paths
- Exclude checks
Reference to undeclared property \CI->db
Open
CI::$APP->db = DB($params, $query_builder);
- Exclude checks
Reference to undeclared property \CI->lang
Open
CI::$APP->lang->load($langfile, $idiom, $return, $add_suffix, $alt_path, $this->_module);
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method library
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $params [description]'
Open
* @param [type] $params [description]
- Exclude checks
Reference to undeclared class \CI_Loader
(Did you mean class \MX_Loader or class \MY_Loader) Open
parent::model($model, $object_name, $connect);
- Exclude checks
Call to undeclared function \load_class()
Open
class_exists('CI_Model', false) or load_class('Model', 'core');
- Exclude checks
Saw unextractable annotation for comment '* @method initialize'
Open
* @method initialize
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method database
- Exclude checks
Reference to undeclared class \CI_Loader
(Did you mean class \MX_Loader or class \MY_Loader) Open
return parent::helper($helper);
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method language
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method model
- Exclude checks
Saw unextractable annotation for comment '* @method model'
Open
* @method model
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method module
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Saw unextractable annotation for comment '* @method helper'
Open
* @method helper
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $object_name [description]'
Open
* @param [type] $object_name [description]
- Exclude checks
Class extends undeclared class \CI_Loader
(Did you mean class \MX_Loader or class \MY_Loader) Open
class MX_Loader extends CI_Loader
- Exclude checks
Saw unextractable annotation for comment '* @method database'
Open
* @method database
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Call to undeclared function \DB()
(Did you mean \dl()) Open
return DB($params, $query_builder);
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Saw unextractable annotation for comment '* @method libraries'
Open
* @method libraries
- Exclude checks
Reference to undeclared property \MX_Loader->controller
(Did you mean $controller) Open
$this->controller = $controller;
- Exclude checks
Reference to undeclared constant \BASEPATH
Open
require_once BASEPATH.'database/DB'.EXT;
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method helpers
- Exclude checks
Reference to undeclared property \MX_Loader->_ci_classes
Open
$this->_ci_classes[$class] = $_alias;
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Reference to undeclared property \MX_Loader->_ci_models
Open
$this->_ci_models[] = $_alias;
- Exclude checks
Saw unextractable annotation for comment '* @method _add_module_paths'
Open
* @method _add_module_paths
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method config
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $languages [description]'
Open
* @param [type] $languages [description]
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $file [description]'
Open
* @param [type] $file [description]
- Exclude checks
Saw unextractable annotation for comment '* @method library'
Open
* @method library
- Exclude checks
Reference to undeclared property \CI->config
Open
return CI::$APP->config->load($file, $use_sections, $fail_gracefully, $this->_module);
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $library [description]'
Open
* @param [type] $library [description]
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $module [description]'
Open
* @param [type] $module [description]
- Exclude checks
Saw unextractable annotation for comment '* @method config'
Open
* @method config
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $langfile [description]'
Open
* @param [type] $langfile [description]
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method libraries
- Exclude checks
Saw unextractable annotation for comment '* @method models'
Open
* @method models
- Exclude checks
Call to undeclared function \DB()
(Did you mean \dl()) Open
CI::$APP->db = DB($params, $query_builder);
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method models
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Saw unextractable annotation for comment '* @method module'
Open
* @method module
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $model [description]'
Open
* @param [type] $model [description]
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $query_builder [description]'
Open
* @param [type] $query_builder [description]
- Exclude checks
Reference to undeclared property \CI->db
Open
isset(CI::$APP->db) && is_object(CI::$APP->db) && ! empty(CI::$APP->db->conn_id)) {
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Reference to undeclared property \MX_Loader->_ci_helpers
Open
$this->_ci_helpers[$_helper] = true;
- Exclude checks
Call to undeclared method \MX_Loader::_ci_load_library
Open
$this->_ci_load_library($library, $params, $object_name);
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $libraries [description]'
Open
* @param [type] $libraries [description]
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method initialize
- Exclude checks
Reference to undeclared class \CI_Loader
(Did you mean class \MX_Loader or class \MY_Loader) Open
parent::initialize();
- Exclude checks
Saw unextractable annotation for comment '* @method helpers'
Open
* @method helpers
- Exclude checks
Saw unextractable annotation for comment '* @method language'
Open
* @method language
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $models [description]'
Open
* @param [type] $models [description]
- Exclude checks
Reference to undeclared property \CI->router
Open
$this->_module = CI::$APP->router->fetch_module();
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method helper
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method languages
- Exclude checks
Saw unextractable annotation for comment '* @method languages'
Open
* @method languages
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $object_name [description]'
Open
* @param [type] $object_name [description]
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $modules [description]'
Open
* @param [type] $modules [description]
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method plugins
- Exclude checks
Call to undeclared method \MX_Loader::add_package_path
Open
$this->add_package_path($package_path);
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Reference to undeclared property \CI->output
Open
CI::$APP->output->append_output(ob_get_clean());
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method _autoloader
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $component [description]'
Open
* @param [type] $component [description]
- Exclude checks
Call to undeclared method \MX_Loader::driver
Open
is_int($item) ? $this->driver($alias) : $this->driver($item, $alias);
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Saw unextractable annotation for comment '* @method modules'
Open
* @method modules
- Exclude checks
Reference to undeclared constant \APPPATH
Open
if ($path === false && ! is_file($_plugin = APPPATH.'plugins/'.$_plugin.EXT)) {
- Exclude checks
Saw unextractable annotation for comment '* @method view'
Open
* @method view
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $view [description]'
Open
* @param [type] $view [description]
- Exclude checks
Argument 1 (filename)
is ?''
but \file_get_contents()
takes string
Open
echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
- Exclude checks
Call to undeclared function \show_error()
Open
show_error("Unable to locate the plugin file: {$_plugin}");
- Exclude checks
Reference to undeclared property \MX_Loader->_ci_view_paths
Open
$this->_ci_view_paths = [$path => true] + $this->_ci_view_paths;
- Exclude checks
Saw unextractable annotation for comment '* @method _ci_get_component'
Open
* @method _ci_get_component
- Exclude checks
Saw unextractable annotation for comment '* @method _ci_load'
Open
* @method _ci_load
- Exclude checks
Call to undeclared method \MX_Loader::_ci_prepare_view_vars
Open
return $this->_ci_load(['_ci_view' => $view, '_ci_vars' => $this->_ci_prepare_view_vars($vars), '_ci_return' => $return]);
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $class [description]'
Open
* @param [type] $class [description]
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $_ci_data [description]'
Open
* @param [type] $_ci_data [description]
- Exclude checks
Saw unextractable annotation for comment '* @method plugin'
Open
* @method plugin
- Exclude checks
Reference to undeclared property \CI->config
Open
if ((bool) @ini_get('short_open_tag') === false && CI::$APP->config->item('rewrite_short_tags') == true) {
- Exclude checks
Saw unextractable annotation for comment '* @method _autoloader'
Open
* @method _autoloader
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $plugin [description]'
Open
* @param [type] $plugin [description]
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Saw unextractable annotation for comment '* @method plugins'
Open
* @method plugins
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $plugins [description]'
Open
* @param [type] $plugins [description]
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method view
- Exclude checks
Reference to undeclared property \CI->config
(Did you mean $config) Open
if (!$db = CI::$APP->config->item('database') && in_array('database', $autoload['libraries'])) {
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method modules
- Exclude checks
Saw unextractable annotation for comment '* @method __get'
Open
* @method __get
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method plugin
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $autoload [description]'
Open
* @param [type] $autoload [description]
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method _ci_get_component
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method __get
- Exclude checks
The phpdoc comment for @method
cannot occur on a method
Open
* @method _ci_load
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Call to undeclared function \log_message()
Open
log_message('debug', 'File loaded: '.$_ci_path);
- Exclude checks
Saw unextractable annotation for comment '* @param [type] $params [description]'
Open
* @param [type] $params [description]
- Exclude checks
Call to undeclared method \MX_Loader::_ci_object_to_array
Open
return $this->_ci_load(['_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return]);
- Exclude checks
Saw unextractable annotation for comment '* @return [type] [description]'
Open
* @return [type] [description]
- Exclude checks
Call to undeclared function \show_error()
Open
show_error('Unable to load the requested file: '.$_ci_file);
- Exclude checks
Variable $_ci_return
is undeclared Open
if ($_ci_return === true) {
- Exclude checks
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (version_compare(phpversion(), '7.1', '<')) {
// php version isn't high enough
list($path, $_helper) = Modules::find($helper.'_helper', $this->_module, 'helpers/');
} else {
[$path, $_helper] = Modules::find($helper.'_helper', $this->_module, 'helpers/');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 91.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (version_compare(phpversion(), '7.1', '<')) {
// php version isn't high enough
list($path, $_plugin) = Modules::find($plugin.'_pi', $this->_module, 'plugins/');
} else {
[$path, $_plugin] = Modules::find($plugin.'_pi', $this->_module, 'plugins/');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 91.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class MX_Loader extends CI_Loader
- Exclude checks
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 36 and the first side effect is on line 1. Open
<?php defined('BASEPATH') or exit('No direct script access allowed');
- Exclude checks
The property $_ci_plugins is not named in camelCase. Open
class MX_Loader extends CI_Loader
{
protected $_module;
public $_ci_plugins = [];
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $_ci_cached_vars is not named in camelCase. Open
class MX_Loader extends CI_Loader
{
protected $_module;
public $_ci_plugins = [];
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The class MX_Loader is not named in CamelCase. Open
class MX_Loader extends CI_Loader
{
protected $_module;
public $_ci_plugins = [];
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
The parameter $use_sections is not named in camelCase. Open
public function config($file, $use_sections = false, $fail_gracefully = false)
{
return CI::$APP->config->load($file, $use_sections, $fail_gracefully, $this->_module);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $fail_gracefully is not named in camelCase. Open
public function config($file, $use_sections = false, $fail_gracefully = false)
{
return CI::$APP->config->load($file, $use_sections, $fail_gracefully, $this->_module);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $query_builder is not named in camelCase. Open
public function database($params = '', $return = false, $query_builder = null)
{
if ($return === false && $query_builder === null &&
isset(CI::$APP->db) && is_object(CI::$APP->db) && ! empty(CI::$APP->db->conn_id)) {
return false;
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The property $_module is not named in camelCase. Open
class MX_Loader extends CI_Loader
{
protected $_module;
public $_ci_plugins = [];
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $add_suffix is not named in camelCase. Open
public function language($langfile, $idiom = '', $return = false, $add_suffix = true, $alt_path = '')
{
CI::$APP->lang->load($langfile, $idiom, $return, $add_suffix, $alt_path, $this->_module);
return $this;
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $alt_path is not named in camelCase. Open
public function language($langfile, $idiom = '', $return = false, $add_suffix = true, $alt_path = '')
{
CI::$APP->lang->load($langfile, $idiom, $return, $add_suffix, $alt_path, $this->_module);
return $this;
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $db. Configured minimum length is 3. Open
if (!$db = CI::$APP->config->item('database') && in_array('database', $autoload['libraries'])) {
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $_ci_data is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $object_name is not named in camelCase. Open
public function model($model, $object_name = null, $connect = false)
{
if (is_array($model)) {
return $this->models($model);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $object_name is not named in camelCase. Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Property name "$_module" should not be prefixed with an underscore to indicate visibility Open
protected $_module;
- Exclude checks
Blank line found at start of control structure Open
if ($params === null) {
- Exclude checks
Method name "_autoloader" should not be prefixed with an underscore to indicate visibility Open
public function _autoloader($autoload)
- Exclude checks
Method name "MX_Loader::_ci_get_component" is not in camel caps format Open
protected function &_ci_get_component($component)
- Exclude checks
Method name "MX_Loader::_add_module_paths" is not in camel caps format Open
public function _add_module_paths($module = '')
- Exclude checks
Method name "_ci_get_component" should not be prefixed with an underscore to indicate visibility Open
protected function &_ci_get_component($component)
- Exclude checks
Method name "_ci_load" should not be prefixed with an underscore to indicate visibility Open
public function _ci_load($_ci_data)
- Exclude checks
Property name "$_ci_plugins" should not be prefixed with an underscore to indicate visibility Open
public $_ci_plugins = [];
- Exclude checks
Blank line found at start of control structure Open
if ($this->_module) {
- Exclude checks
Property name "$_ci_cached_vars" should not be prefixed with an underscore to indicate visibility Open
public $_ci_cached_vars = [];
- Exclude checks
Method name "_add_module_paths" should not be prefixed with an underscore to indicate visibility Open
public function _add_module_paths($module = '')
- Exclude checks
Method name "MX_Loader::_ci_load" is not in camel caps format Open
public function _ci_load($_ci_data)
- Exclude checks
Line exceeds 120 characters; contains 128 characters Open
echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
- Exclude checks
Line exceeds 120 characters; contains 134 characters Open
return $this->_ci_load(['_ci_view' => $view, '_ci_vars' => $this->_ci_prepare_view_vars($vars), '_ci_return' => $return]);
- Exclude checks
Line exceeds 120 characters; contains 132 characters Open
return $this->_ci_load(['_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return]);
- Exclude checks
Class name "MX_Loader" is not in camel caps format Open
class MX_Loader extends CI_Loader
- Exclude checks
The variable $query_builder is not named in camelCase. Open
public function database($params = '', $return = false, $query_builder = null)
{
if ($return === false && $query_builder === null &&
isset(CI::$APP->db) && is_object(CI::$APP->db) && ! empty(CI::$APP->db->conn_id)) {
return false;
- 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 $_helper is not named in camelCase. Open
public function helper($helper = [])
{
if (is_array($helper)) {
return $this->helpers($helper);
}
- 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 $module_path is not named in camelCase. Open
public function _add_module_paths($module = '')
{
if (empty($module)) {
return;
}
- 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 $module_path is not named in camelCase. Open
public function _add_module_paths($module = '')
{
if (empty($module)) {
return;
}
- 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 $fail_gracefully is not named in camelCase. Open
public function config($file, $use_sections = false, $fail_gracefully = false)
{
return CI::$APP->config->load($file, $use_sections, $fail_gracefully, $this->_module);
}
- 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 $use_sections is not named in camelCase. Open
public function config($file, $use_sections = false, $fail_gracefully = false)
{
return CI::$APP->config->load($file, $use_sections, $fail_gracefully, $this->_module);
}
- 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 $module_path is not named in camelCase. Open
public function _add_module_paths($module = '')
{
if (empty($module)) {
return;
}
- 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 $_helper is not named in camelCase. Open
public function helper($helper = [])
{
if (is_array($helper)) {
return $this->helpers($helper);
}
- 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 $_helper is not named in camelCase. Open
public function helper($helper = [])
{
if (is_array($helper)) {
return $this->helpers($helper);
}
- 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 $query_builder is not named in camelCase. Open
public function database($params = '', $return = false, $query_builder = null)
{
if ($return === false && $query_builder === null &&
isset(CI::$APP->db) && is_object(CI::$APP->db) && ! empty(CI::$APP->db->conn_id)) {
return false;
- 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 $query_builder is not named in camelCase. Open
public function database($params = '', $return = false, $query_builder = null)
{
if ($return === false && $query_builder === null &&
isset(CI::$APP->db) && is_object(CI::$APP->db) && ! empty(CI::$APP->db->conn_id)) {
return false;
- 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 $_helper is not named in camelCase. Open
public function helper($helper = [])
{
if (is_array($helper)) {
return $this->helpers($helper);
}
- 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 $_alias is not named in camelCase. Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
- 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 $_plugin is not named in camelCase. Open
public function plugin($plugin)
{
if (is_array($plugin)) {
return $this->plugins($plugin);
}
- 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 $_ci_path is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_plugin is not named in camelCase. Open
public function plugin($plugin)
{
if (is_array($plugin)) {
return $this->plugins($plugin);
}
- 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 $_ci_view is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_ci_view is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_ci_file is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_model is not named in camelCase. Open
public function model($model, $object_name = null, $connect = false)
{
if (is_array($model)) {
return $this->models($model);
}
- 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 $_view is not named in camelCase. Open
public function view($view, $vars = [], $return = false)
{
// Backward function
// Before PHP 7.1.0, list() only worked on numerical arrays and assumes the numerical indices start at 0.
if (version_compare(phpversion(), '7.1', '<')) {
- 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 $_helper is not named in camelCase. Open
public function helpers($helpers = [])
{
foreach ($helpers as $_helper) {
$this->helper($_helper);
}
- 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 $_alias is not named in camelCase. Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
- 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 $_ci_data is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_ci_file is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_ci_path is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $alt_path is not named in camelCase. Open
public function language($langfile, $idiom = '', $return = false, $add_suffix = true, $alt_path = '')
{
CI::$APP->lang->load($langfile, $idiom, $return, $add_suffix, $alt_path, $this->_module);
return $this;
}
- 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 $_alias is not named in camelCase. Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
- 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 $_library is not named in camelCase. Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
- 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 $_alias is not named in camelCase. Open
public function model($model, $object_name = null, $connect = false)
{
if (is_array($model)) {
return $this->models($model);
}
- 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 $_view is not named in camelCase. Open
public function view($view, $vars = [], $return = false)
{
// Backward function
// Before PHP 7.1.0, list() only worked on numerical arrays and assumes the numerical indices start at 0.
if (version_compare(phpversion(), '7.1', '<')) {
- 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 $_ci_view is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_ci_file is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_ci_path is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_model is not named in camelCase. Open
public function model($model, $object_name = null, $connect = false)
{
if (is_array($model)) {
return $this->models($model);
}
- 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 $_plugin is not named in camelCase. Open
public function plugins($plugins)
{
foreach ($plugins as $_plugin) {
$this->plugin($_plugin);
}
- 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 $_view is not named in camelCase. Open
public function view($view, $vars = [], $return = false)
{
// Backward function
// Before PHP 7.1.0, list() only worked on numerical arrays and assumes the numerical indices start at 0.
if (version_compare(phpversion(), '7.1', '<')) {
- 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 $_ci_file is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_ci_path is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_ci_path is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_helper is not named in camelCase. Open
public function helpers($helpers = [])
{
foreach ($helpers as $_helper) {
$this->helper($_helper);
}
- 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 $_alias is not named in camelCase. Open
public function model($model, $object_name = null, $connect = false)
{
if (is_array($model)) {
return $this->models($model);
}
- 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 $_model is not named in camelCase. Open
public function model($model, $object_name = null, $connect = false)
{
if (is_array($model)) {
return $this->models($model);
}
- 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 $_plugin is not named in camelCase. Open
public function plugin($plugin)
{
if (is_array($plugin)) {
return $this->plugins($plugin);
}
- 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 $_ci_view is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_alias is not named in camelCase. Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
- 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 $_model is not named in camelCase. Open
public function model($model, $object_name = null, $connect = false)
{
if (is_array($model)) {
return $this->models($model);
}
- 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 $_language is not named in camelCase. Open
public function languages($languages)
{
foreach ($languages as $_language) {
$this->language($_language);
}
- 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 $_ci_path is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_alias is not named in camelCase. Open
public function model($model, $object_name = null, $connect = false)
{
if (is_array($model)) {
return $this->models($model);
}
- 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 $_ci_path is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_plugin is not named in camelCase. Open
public function plugins($plugins)
{
foreach ($plugins as $_plugin) {
$this->plugin($_plugin);
}
- 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 $_alias is not named in camelCase. Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
- 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 $_alias is not named in camelCase. Open
public function model($model, $object_name = null, $connect = false)
{
if (is_array($model)) {
return $this->models($model);
}
- 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 $_plugin is not named in camelCase. Open
public function plugin($plugin)
{
if (is_array($plugin)) {
return $this->plugins($plugin);
}
- 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 $_ci_return is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $package_path is not named in camelCase. Open
public function _autoloader($autoload)
{
$path = false;
if ($this->_module) {
- 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 $_language is not named in camelCase. Open
public function languages($languages)
{
foreach ($languages as $_language) {
$this->language($_language);
}
- 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 $_alias is not named in camelCase. Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
- 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 $object_name is not named in camelCase. Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
- 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 $object_name is not named in camelCase. Open
public function model($model, $object_name = null, $connect = false)
{
if (is_array($model)) {
return $this->models($model);
}
- 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 $_module is not named in camelCase. Open
public function modules($modules)
{
foreach ($modules as $_module) {
$this->module($_module);
}
- 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 $_library is not named in camelCase. Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
- 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 $_ci_vars is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $object_name is not named in camelCase. Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
- 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 $_library is not named in camelCase. Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
- 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 $add_suffix is not named in camelCase. Open
public function language($langfile, $idiom = '', $return = false, $add_suffix = true, $alt_path = '')
{
CI::$APP->lang->load($langfile, $idiom, $return, $add_suffix, $alt_path, $this->_module);
return $this;
}
- 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 $_library is not named in camelCase. Open
public function library($library, $params = null, $object_name = null)
{
if (is_array($library)) {
return $this->libraries($library);
}
- 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 $_plugin is not named in camelCase. Open
public function plugin($plugin)
{
if (is_array($plugin)) {
return $this->plugins($plugin);
}
- 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 $_alias is not named in camelCase. Open
public function module($module, $params = null)
{
if (is_array($module)) {
return $this->modules($module);
}
- 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 $_plugin is not named in camelCase. Open
public function plugin($plugin)
{
if (is_array($plugin)) {
return $this->plugins($plugin);
}
- 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 $_ci_path is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_ci_vars is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $_ci_path is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 $package_path is not named in camelCase. Open
public function _autoloader($autoload)
{
$path = false;
if ($this->_module) {
- 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 $object_name is not named in camelCase. Open
public function model($model, $object_name = null, $connect = false)
{
if (is_array($model)) {
return $this->models($model);
}
- 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 $_module is not named in camelCase. Open
public function modules($modules)
{
foreach ($modules as $_module) {
$this->module($_module);
}
- 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 $_ci_path is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 _add_module_paths is not named in camelCase. Open
public function _add_module_paths($module = '')
{
if (empty($module)) {
return;
}
- 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 _ci_load is not named in camelCase. Open
public function _ci_load($_ci_data)
{
extract($_ci_data);
if (isset($_ci_view)) {
- 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 _ci_get_component is not named in camelCase. Open
protected function &_ci_get_component($component)
{
return CI::$APP->$component;
}
- 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 _autoloader is not named in camelCase. Open
public function _autoloader($autoload)
{
$path = false;
if ($this->_module) {
- 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() {
}
}