Function SmilesAdmin
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function SmilesAdmin() {
$db =& icms_db_Factory::instance();
$url_smiles = ICMS_UPLOAD_URL;
icms_cp_header();
echo '<div class="CPbigTitle" style="background-image: url(' . ICMS_MODULES_URL . '/system/admin/smilies/images/smilies_big.png)">' . _AM_SMILESCONTROL . '</div><br />';
- 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 SmilesAdmin
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
function SmilesAdmin() {
$db =& icms_db_Factory::instance();
$url_smiles = ICMS_UPLOAD_URL;
icms_cp_header();
echo '<div class="CPbigTitle" style="background-image: url(' . ICMS_MODULES_URL . '/system/admin/smilies/images/smilies_big.png)">' . _AM_SMILESCONTROL . '</div><br />';
Function SmilesEdit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function SmilesEdit($id) {
$db = &icms_db_Factory::instance();
icms_cp_header();
echo '<a href="admin.php?fct=smilies">' . _AM_SMILESCONTROL . '</a> <span style="font-weight:bold;">»»</span> ' . _AM_EDITSMILE . '<br /><br />';
if ($getsmiles = $db->query("SELECT * FROM " . $db->prefix("smiles") . " WHERE id = '" . (int) $id . "'")) {
- 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 using undefined variables such as '$smile_form' which will lead to PHP notices. Open
$smile_form->display();
- 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 '$smile_form' which will lead to PHP notices. Open
$smile_form->display();
- 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 '$smile_form' which will lead to PHP notices. Open
$smile_form->addElement(new icms_form_elements_Hidden('old_smile', $smiles['smile_url']));
- 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
Missing class import via use statement (line '133', column '33'). Open
$smile_form->addElement(new icms_form_elements_Hidden('old_smile', $smiles['smile_url']));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid using static access to class 'icms_db_Factory' in method 'SmilesAdmin'. Open
$db =& icms_db_Factory::instance();
- 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 'icms_core_DataFilter' in method 'SmilesAdmin'. Open
$smiles['code'] = icms_core_DataFilter::htmlSpecialChars($smiles['code']);
- 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 '125', column '8'). Open
function SmilesEdit($id) {
$db = &icms_db_Factory::instance();
icms_cp_header();
echo '<a href="admin.php?fct=smilies">' . _AM_SMILESCONTROL . '</a> <span style="font-weight:bold;">»»</span> ' . _AM_EDITSMILE . '<br /><br />';
if ($getsmiles = $db->query("SELECT * FROM " . $db->prefix("smiles") . " WHERE id = '" . (int) $id . "'")) {
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid assigning values to variables in if clauses and the like (line '56', column '8'). Open
function SmilesAdmin() {
$db =& icms_db_Factory::instance();
$url_smiles = ICMS_UPLOAD_URL;
icms_cp_header();
echo '<div class="CPbigTitle" style="background-image: url(' . ICMS_MODULES_URL . '/system/admin/smilies/images/smilies_big.png)">' . _AM_SMILESCONTROL . '</div><br />';
- 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 'icms_db_Factory' in method 'SmilesEdit'. Open
$db = &icms_db_Factory::instance();
- 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 'icms_core_DataFilter' in method 'SmilesEdit'. Open
$smiles['smile_code'] = icms_core_DataFilter::htmlSpecialChars($smiles['code']);
- 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 '55', column '6'). Open
function SmilesAdmin() {
$db =& icms_db_Factory::instance();
$url_smiles = ICMS_UPLOAD_URL;
icms_cp_header();
echo '<div class="CPbigTitle" style="background-image: url(' . ICMS_MODULES_URL . '/system/admin/smilies/images/smilies_big.png)">' . _AM_SMILESCONTROL . '</div><br />';
- 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 'icms_core_DataFilter' in method 'SmilesAdmin'. Open
$smiles['smile_url'] = icms_core_DataFilter::htmlSpecialChars($smiles['smile_url']);
- 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 '120', column '6'). Open
function SmilesEdit($id) {
$db = &icms_db_Factory::instance();
icms_cp_header();
echo '<a href="admin.php?fct=smilies">' . _AM_SMILESCONTROL . '</a> <span style="font-weight:bold;">»»</span> ' . _AM_EDITSMILE . '<br /><br />';
if ($getsmiles = $db->query("SELECT * FROM " . $db->prefix("smiles") . " WHERE id = '" . (int) $id . "'")) {
- 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 'icms_core_DataFilter' in method 'SmilesAdmin'. Open
$smiles['smile_emotion'] = icms_core_DataFilter::htmlSpecialChars($smiles['emotion']);
- 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 SmilesEdit uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
if ($smiles = $db->fetchArray($getsmiles)) {
$smiles['smile_code'] = icms_core_DataFilter::htmlSpecialChars($smiles['code']);
$smiles['smile_url'] = icms_core_DataFilter::htmlSpecialChars($smiles['smile_url']);
$smiles['smile_desc'] = icms_core_DataFilter::htmlSpecialChars($smiles['emotion']);
- 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 'icms_core_DataFilter' in method 'SmilesEdit'. Open
$smiles['smile_url'] = icms_core_DataFilter::htmlSpecialChars($smiles['smile_url']);
- 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 SmilesAdmin uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$class = 'odd';
}
- 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 SmilesAdmin uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
echo '<form action="admin.php" method="post"><table width="100%" class="outer" cellpadding="4" cellspacing="1">'
. "<tr align='center'><th align='" . _GLOBAL_LEFT . "'>" ._AM_CODE . "</th>"
. "<th>" ._AM_SMILIE . "</th>"
. "<th>" . _AM_SMILEEMOTION . "</th>"
- 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 SmilesEdit uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
echo _AM_CNRFTSD;
}
- 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 'icms_core_DataFilter' in method 'SmilesEdit'. Open
$smiles['smile_desc'] = icms_core_DataFilter::htmlSpecialChars($smiles['emotion']);
- 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 SmilesAdmin uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
echo _AM_CNRFTSD;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid unused local variables such as '$smile_form'. Open
$smile_form->display();
- 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 '$numsmiles'. Open
if (($numsmiles = $db->getRowsNum($getsmiles)) == "0") {
- 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 static property user
from undeclared class \icms
Open
if (!is_object(icms::$user) || !is_object($icmsModule) || !icms::$user->isAdmin($icmsModule->getVar('mid'))) {
- Exclude checks
Call to method htmlSpecialChars
from undeclared class \icms_core_DataFilter
Open
$smiles['smile_url'] = icms_core_DataFilter::htmlSpecialChars($smiles['smile_url']);
- Exclude checks
Call to method htmlSpecialChars
from undeclared class \icms_core_DataFilter
Open
$smiles['smile_url'] = icms_core_DataFilter::htmlSpecialChars($smiles['smile_url']);
- Exclude checks
Reference to static property security
from undeclared class \icms
Open
. icms::$security->getTokenHTML()
- Exclude checks
Call to method htmlSpecialChars
from undeclared class \icms_core_DataFilter
Open
$smiles['code'] = icms_core_DataFilter::htmlSpecialChars($smiles['code']);
- Exclude checks
Call to method htmlSpecialChars
from undeclared class \icms_core_DataFilter
Open
$smiles['smile_emotion'] = icms_core_DataFilter::htmlSpecialChars($smiles['emotion']);
- Exclude checks
Reference to undeclared constant \_SUBMIT
Open
. '<input type="submit" value="' . _SUBMIT . '" /></tr></table></form>';
- Exclude checks
Call to method __construct
from undeclared class \icms_form_elements_Hidden
Open
$smile_form->addElement(new icms_form_elements_Hidden('old_smile', $smiles['smile_url']));
- Exclude checks
Variable $smile_form
is undeclared Open
$smile_form->display();
- Exclude checks
Call to method instance
from undeclared class \icms_db_Factory
Open
$db =& icms_db_Factory::instance();
- Exclude checks
Reference to undeclared constant \_DELETE
Open
. "<a href='admin.php?fct=smilies&op=SmilesDel&id=" . $smiles['id'] . "'><img src='". ICMS_IMAGES_SET_URL . "/actions/editdelete.png' alt=" . _DELETE . " title=" . _DELETE . " /></a></td>"
- Exclude checks
Call to method instance
from undeclared class \icms_db_Factory
Open
$db = &icms_db_Factory::instance();
- Exclude checks
Call to method htmlSpecialChars
from undeclared class \icms_core_DataFilter
Open
$smiles['smile_desc'] = icms_core_DataFilter::htmlSpecialChars($smiles['emotion']);
- Exclude checks
Reference to undeclared constant \_EDIT
Open
echo " /></td><td><a href='admin.php?fct=smilies&op=SmilesEdit&id=" . $smiles['id'] . "'><img src='". ICMS_IMAGES_SET_URL . "/actions/edit.png' alt=" . _EDIT . " title=" . _EDIT . " /></a> "
- Exclude checks
Variable $smile_form
is undeclared Open
$smile_form->display();
- Exclude checks
Call to method htmlSpecialChars
from undeclared class \icms_core_DataFilter
Open
$smiles['smile_code'] = icms_core_DataFilter::htmlSpecialChars($smiles['code']);
- Exclude checks
Variable $smile_form
is undeclared Open
$smile_form->addElement(new icms_form_elements_Hidden('old_smile', $smiles['smile_url']));
- Exclude checks
Variable $icmsModule
is undeclared Open
if (!is_object(icms::$user) || !is_object($icmsModule) || !icms::$user->isAdmin($icmsModule->getVar('mid'))) {
- Exclude checks
Avoid variables with short names like $i. Configured minimum length is 3. Open
$i = 0;
- 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
Avoid variables with short names like $db. Configured minimum length is 3. Open
$db =& icms_db_Factory::instance();
- 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
Avoid variables with short names like $db. Configured minimum length is 3. Open
$db = &icms_db_Factory::instance();
- 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
Avoid variables with short names like $id. Configured minimum length is 3. Open
function SmilesEdit($id) {
- 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
Inline control structures are not allowed Open
if (!$smiles) $smiles = array();
- Exclude checks
The variable $url_smiles is not named in camelCase. Open
function SmilesAdmin() {
$db =& icms_db_Factory::instance();
$url_smiles = ICMS_UPLOAD_URL;
icms_cp_header();
echo '<div class="CPbigTitle" style="background-image: url(' . ICMS_MODULES_URL . '/system/admin/smilies/images/smilies_big.png)">' . _AM_SMILESCONTROL . '</div><br />';
- 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 $url_smiles is not named in camelCase. Open
function SmilesAdmin() {
$db =& icms_db_Factory::instance();
$url_smiles = ICMS_UPLOAD_URL;
icms_cp_header();
echo '<div class="CPbigTitle" style="background-image: url(' . ICMS_MODULES_URL . '/system/admin/smilies/images/smilies_big.png)">' . _AM_SMILESCONTROL . '</div><br />';
- 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 $smile_form is not named in camelCase. Open
function SmilesEdit($id) {
$db = &icms_db_Factory::instance();
icms_cp_header();
echo '<a href="admin.php?fct=smilies">' . _AM_SMILESCONTROL . '</a> <span style="font-weight:bold;">»»</span> ' . _AM_EDITSMILE . '<br /><br />';
if ($getsmiles = $db->query("SELECT * FROM " . $db->prefix("smiles") . " WHERE id = '" . (int) $id . "'")) {
- 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 $smile_form is not named in camelCase. Open
function SmilesEdit($id) {
$db = &icms_db_Factory::instance();
icms_cp_header();
echo '<a href="admin.php?fct=smilies">' . _AM_SMILESCONTROL . '</a> <span style="font-weight:bold;">»»</span> ' . _AM_EDITSMILE . '<br /><br />';
if ($getsmiles = $db->query("SELECT * FROM " . $db->prefix("smiles") . " WHERE id = '" . (int) $id . "'")) {
- 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 $smile_form is not named in camelCase. Open
function SmilesAdmin() {
$db =& icms_db_Factory::instance();
$url_smiles = ICMS_UPLOAD_URL;
icms_cp_header();
echo '<div class="CPbigTitle" style="background-image: url(' . ICMS_MODULES_URL . '/system/admin/smilies/images/smilies_big.png)">' . _AM_SMILESCONTROL . '</div><br />';
- 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();
}
}