Showing 664 of 664 total issues
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 39 and the first side effect is on line 27. Open
Open
<?php namespace XoopsModules\Cardealer;
- 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 39 and the first side effect is on line 28. Open
Open
<?php namespace XoopsModules\Cardealer\Form;
- 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 39 and the first side effect is on line 28. Open
Open
<?php namespace XoopsModules\Cardealer\Form;
- 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 37 and the first side effect is on line 32. Open
Open
<?php namespace XoopsModules\Cardealer\Common;
- Exclude checks
Function recurseCopy
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
public static function recurseCopy($src, $dst)
{
$dir = opendir($src);
while (false !== ($file = readdir($dir))) {
if (('.' !== $file) && ('..' !== $file)) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid deeply nested control flow statements. Open
Open
if (file_exists($templateFolder . $v)) {
unlink($templateFolder . $v);
}
Method truncateHtml
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true)
Method cardealer_search
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function cardealer_search($queryarray, $andor, $limit, $offset, $userid)
Expected 1 blank line at end of file; 2 found Open
Open
}
- Exclude checks
Blank line found at start of control structure Open
Open
foreach (array_keys($serviceTempArray) as $i) {
- Exclude checks
Blank line found at start of control structure Open
Open
if ($servpartCount > $servpartPaginationLimit) {
- Exclude checks
Expected 1 blank line at end of file; 2 found Open
Open
define('MI_CARDEALER_SHOW_SAMPLE_BUTTON_DESC', 'If yes, the "Add Sample Data" button will be visible to the Admin. It is Yes as a default for first installation.');
- Exclude checks
Blank line found at start of control structure Open
Open
if ($serviceCount > $servicePaginationLimit) {
- Exclude checks
Expected 1 blank line at end of file; 2 found Open
Open
}
- Exclude checks
Expected 1 blank line at end of file; 2 found Open
Open
}
- Exclude checks
Blank line found at start of control structure Open
Open
if ($workorderCount > $workorderPaginationLimit) {
- Exclude checks
The CASE body must start on the line following the statement Open
Open
case 'clone':
- Exclude checks
Blank line found at start of control structure Open
Open
foreach (array_keys($vehicleTempArray) as $i) {
- Exclude checks
Blank line found at start of control structure Open
Open
foreach (array_keys($workservTempArray) as $i) {
- Exclude checks
Blank line found at start of control structure Open
Open
if ($previousVersion < 240) {
- Exclude checks