modifyAd accesses the super-global variable $GLOBALS. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
Method modifyAd
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
File modify_ads.php
has 386 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1);
/*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
Function modifyAd
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 index
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
Method modifyAds
has 20 arguments (exceeds 4 allowed). Consider refactoring. Open
$lid,
$cat,
$title,
$status,
$expire,
Function listingDel
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function listingDel($lid, $photo): void
{
global $xoopsDB;
$helper = Helper::getInstance();
$lid = (int)$lid;
- 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 index
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 listingDel
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function listingDel($lid, $photo): void
{
global $xoopsDB;
$helper = Helper::getInstance();
$lid = (int)$lid;
The function modifyAd() has 205 lines of code. Current threshold is set to 100. Avoid really long methods. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- Exclude checks
The function modifyAd() has an NPath complexity of 3458. The configured NPath complexity threshold is 200. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The function modifyAds has 20 parameters. Consider reducing the number of parameters to less than 10. Open
function modifyAds(
$lid,
$cat,
$title,
$status,
- Exclude checks
The function index() has an NPath complexity of 13824. The configured NPath complexity threshold is 200. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The function index() has a Cyclomatic Complexity of 19. The configured cyclomatic complexity threshold is 10. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 function modifyAd() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
Missing class import via use statement (line '52', column '19'). Open
throw new \RuntimeException(sprintf('Directory "%s" was not created', $photo_dir));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '55', column '19'). Open
throw new \RuntimeException(sprintf('Directory "%s" was not created', $photo_thumb_dir));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '163', column '31'). Open
$tempXoopsLocal = new \XoopsLocal();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '58', column '19'). Open
throw new \RuntimeException(sprintf('Directory "%s" was not created', $photo_resized_dir));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method index uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
echo "<table class='outer' width='50%' border='0'><tr><td width=40>";
echo "<img src='../assets/images/admin/search_button_green_32.png' border=0 alt=\"._AM_ADSLIGHT_RELEASEOK.\" ></td><td>";
echo "<span style='color: #00B4C4;'><b>" . _AM_ADSLIGHT_NOANNVAL . '</b></span>';
echo '</td></tr></table><br>';
- 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 '\XoopsModules\Adslight\Helper' in method 'modifyAd'. Open
$helper = Helper::getInstance();
- 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 '\XoopsModules\Adslight\Helper' in method 'modifyAd'. Open
$helper = Helper::getInstance();
- 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 '\XoopsModules\Adslight\Utility' in method 'modifyAd'. Open
$wysiwyg_text_area = Utility::getEditor($helper, $options);
- 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 '\XoopsModules\Adslight\Helper' in method 'listingDel'. Open
$helper = Helper::getInstance();
- 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 '\XoopsModules\Adslight\Helper' in method 'index'. Open
$helper = Helper::getInstance();
- 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 '\XoopsModules\Adslight\Helper' in method 'modifyAds'. Open
$helper = Helper::getInstance();
- 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 '$priceFormatted'. Open
$priceFormatted = $tempXoopsLocal->number_format($price);
- 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 '$myts'. Open
global $xoopsDB, $myts;
- 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 '$xoopsConfig'. Open
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
- 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 '$valid'. Open
while ([$lid, $cid, $title, $status, $expire, $type, $desctext, $tel, $price, $typeprice, $typecondition, $date_created, $email, $submitter, $town, $country, $contactby, $premium, $valid, $photo] = $xoopsDB->fetchRow(
- 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 '$xoopsModule'. Open
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
- 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 '$result'. Open
$result = $xoopsDB->query($sql);
- 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 '$photo'. Open
function listingDel($lid, $photo): void
- 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 '$contactselect'. Open
$contactselect = '';
- 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
Similar blocks of code found in 3 locations. Consider refactoring. Open
echo "<table class='bnone'><tr class='head' border='1'>
<td>" . _AM_ADSLIGHT_NUMANN . " </td><td>{$lid} " . _AM_ADSLIGHT_ADDED_ON . " {$date2}</td>
</tr><tr class='head' border='1'>
<td>" . _AM_ADSLIGHT_SENDBY . " </td><td>{$submitter}</td>
</tr><tr class='head' border='1'>
- 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 108.
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
Identical blocks of code found in 2 locations. Consider refactoring. Open
echo " <td class='head'>"
. _AM_ADSLIGHT_CONTACTBY
. " </td><td class='head'><select name=\"contactby\">\n"
// . " <option value=\"{$contactby}\">{$contactselect[$contactby]}</option>\n"
. " <option value=\"1\"{$contactSel1}>"
- 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 98.
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
The parameter $date_created is not named in camelCase. Open
function modifyAds(
$lid,
$cat,
$title,
$status,
- 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
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 31. Open
<?php declare(strict_types=1);
- Exclude checks
There must be one USE keyword per declaration Open
use XoopsModules\Adslight\{
- Exclude checks
There must be one blank line after the last USE statement; 0 found; Open
use XoopsModules\Adslight\{
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
<td>" . _AM_ADSLIGHT_TOWN . " </td><td><input type=\"text\" name=\"town\" size=\"40\" value=\"{$town}\"></td>
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
<td>" . _AM_ADSLIGHT_COUNTRY . " </td><td><input type=\"text\" name=\"country\" size=\"40\" value=\"{$country}\"></td>
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
<td>" . _AM_ADSLIGHT_PREMIUM . " </td><td><input type=\"text\" name=\"premium\" size=\"3\" value=\"{$premium}\"></td>
- Exclude checks
Line exceeds 120 characters; contains 171 characters Open
echo "<span style='color:#00B4C4;'><b>" . _AM_ADSLIGHT_THEREIS . "</b></span> <b>{$numrows}</b> <span style='color:#00B4C4;'>" . _AM_ADSLIGHT_WAIT . '</b></span>';
- Exclude checks
Line exceeds 120 characters; contains 143 characters Open
echo "<table width='100%' border='0' cellspacing='1' cellpadding='8' style='border: 2px solid #DFE0E0;'><tr class='bg4'><td valign='top'>";
- Exclude checks
Line exceeds 120 characters; contains 123 characters Open
echo '<a href="map.php">' . _AM_ADSLIGHT_GESTCAT . '</a> | <a href="../index.php">' . _AM_ADSLIGHT_ACCESMYANN . '</a>';
- Exclude checks
Line exceeds 120 characters; contains 135 characters Open
echo "<tr><td class='head'>" . _AM_ADSLIGHT_STATUS . "</td><td class='head'><input type=\"radio\" name=\"status\" value=\"0\"";
- Exclude checks
Line exceeds 120 characters; contains 123 characters Open
<td>" . _AM_ADSLIGHT_EXPIRE . " </td><td><input type=\"text\" name=\"expire\" size=\"40\" value=\"{$expire}\"></td>
- Exclude checks
Line exceeds 120 characters; contains 202 characters Open
echo "<tr class='head' border='1'><td>" . _AM_ADSLIGHT_PRICE2 . " </td><td><input type=\"text\" name=\"price\" size=\"20\" value=\"{$price}\"> " . $helper->getConfig('adslight_currency_symbol');
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
<td>" . _AM_ADSLIGHT_PHOTO1 . " </td><td><input type=\"text\" name=\"photo\" size=\"50\" value=\"{$photo}\"></td>
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
<td>" . _AM_ADSLIGHT_TITLE2 . " </td><td><input type=\"text\" name=\"title\" size=\"40\" value=\"{$title}\"></td>
- Exclude checks
Line exceeds 120 characters; contains 257 characters Open
$sql = 'SELECT lid, cid, title, status, expire, type, desctext, tel, price, typeprice, typecondition, date_created, email, submitter, town, country, contactby, premium, valid, photo FROM ' . $xoopsDB->prefix('adslight_listing') . " WHERE lid={$lid}";
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
<td>" . _AM_ADSLIGHT_EMAIL . " </td><td><input type=\"text\" name=\"email\" size=\"40\" value=\"{$email}\"></td>
- Exclude checks
Line exceeds 120 characters; contains 221 characters Open
while ([$lid, $cid, $title, $status, $expire, $type, $desctext, $tel, $price, $typeprice, $typecondition, $date_created, $email, $submitter, $town, $country, $contactby, $premium, $valid, $photo] = $xoopsDB->fetchRow(
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
$sql = 'SELECT nom_condition, id_condition FROM ' . $xoopsDB->prefix('adslight_condition') . ' ORDER BY nom_condition';
- Exclude checks
Line exceeds 120 characters; contains 270 characters Open
$sql = 'SELECT lid, cid, title, status, expire, type, desctext, tel, price, typeprice, typecondition, date_created, email, submitter, town, country, contactby, premium, photo, usid FROM ' . $xoopsDB->prefix('adslight_listing') . " WHERE valid='no' ORDER BY lid";
- Exclude checks
Line exceeds 120 characters; contains 438 characters Open
. " SET cid='{$cat}', title='{$title}', status='{$status}', expire='{$expire}', type='{$type}', desctext='{$desctext}', tel='{$tel}', price='{$price}', typeprice='{$typeprice}', typecondition='{$typecondition}', date_created='{$date_created}', email='{$email}', submitter='{$submitter}', town='{$town}', country='{$country}', contactby='{$contactby}', premium='{$premium}', valid='{$valid}', photo='{$photo}' WHERE lid={$lid}";
- Exclude checks
Line exceeds 120 characters; contains 129 characters Open
echo "<img src='../assets/images/admin/search_button_green_32.png' border=0 alt=\"._AM_ADSLIGHT_RELEASEOK.\" ></td><td>";
- Exclude checks
Line exceeds 120 characters; contains 175 characters Open
$sql = 'SELECT p.url FROM ' . $xoopsDB->prefix('adslight_listing') . ' l LEFT JOIN ' . $xoopsDB->prefix('adslight_pictures') . " p ON l.lid=p.lid WHERE l.lid={$lid}";
- Exclude checks
The variable $photo_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_resized_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_thumb_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_thumb_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_resized_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_thumb_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_resized_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $nom_type is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $wysiwyg_text_area is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $id_price is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $nom_price is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $nom_type is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $id_condition is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $nom_price is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $date_created is not named in camelCase. Open
function modifyAds(
$lid,
$cat,
$title,
$status,
- 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 $photo_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $date_created is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $id_condition is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $id_price is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $photo_thumb_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_resized_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_thumb_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $nom_condition is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $nom_price is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $photo_resized_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $nom_condition is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $photo_thumb_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_thumb_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_resized_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_resized_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_resized_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $photo_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $date_created is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $nom_price is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $id_price is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $id_type is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $id_price is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $id_type is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $id_condition is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $photo_thumb_dir is not named in camelCase. Open
function index(): void
{
global $xoopsDB;
$helper = Helper::getInstance();
- 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 $id_type is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $id_price is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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 $wysiwyg_text_area is not named in camelCase. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$helper = Helper::getInstance();
- 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();
}
}