Avoid using undefined variables such as '$fullpage' which will lead to PHP notices. Open
$allowed_tags = self::get_allowed_tags($mode, $fullpage);
- 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 unused local variables such as '$fullpage'. Open
$allowed_tags = self::get_allowed_tags($mode, $fullpage);
- 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
The class HTML_QuickForm_Rule_HTML is not named in CamelCase. Open
class HTML_QuickForm_Rule_HTML extends HTML_QuickForm_Rule
{
/**
* Function to validate HTML.
*
- 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
Variable "allowed_tags_teacher_full_page" is not in valid camel caps format Open
return array_merge($allowed_tags_teacher, $allowed_tags_teacher_full_page);
- Exclude checks
Variable "allowed_tags_student_full_page" is not in valid camel caps format Open
global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
- Exclude checks
Variable "allowed_tags_student" is not in valid camel caps format Open
return array_merge($allowed_tags_student, $allowed_tags_student_full_page);
- Exclude checks
Variable "allowed_tags_teacher" is not in valid camel caps format Open
return $allowed_tags_teacher;
- Exclude checks
Method name "HTML_QuickForm_Rule_HTML::get_allowed_tags" is not in camel caps format Open
public static function get_allowed_tags($mode)
- Exclude checks
Variable "allowed_tags_student" is not in valid camel caps format Open
return $allowed_tags_student;
- Exclude checks
Variable "allowed_tags" is not in valid camel caps format Open
$cleaned_html = kses($html, $allowed_tags);
- Exclude checks
Variable "allowed_tags_student_full_page" is not in valid camel caps format Open
return array_merge($allowed_tags_student, $allowed_tags_student_full_page);
- Exclude checks
Variable "allowed_tags_teacher" is not in valid camel caps format Open
return array_merge($allowed_tags_teacher, $allowed_tags_teacher_full_page);
- Exclude checks
Variable "allowed_tags" is not in valid camel caps format Open
$allowed_tags = self::get_allowed_tags($mode, $fullpage);
- Exclude checks
Variable "allowed_tags_teacher" is not in valid camel caps format Open
global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
- Exclude checks
Variable "cleaned_html" is not in valid camel caps format Open
return $html == $cleaned_html;
- Exclude checks
Variable "allowed_tags_teacher_full_page" is not in valid camel caps format Open
global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
- Exclude checks
Variable "cleaned_html" is not in valid camel caps format Open
$cleaned_html = kses($html, $allowed_tags);
- Exclude checks
Variable "allowed_tags_student" is not in valid camel caps format Open
global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
- Exclude checks
Class name "HTML_QuickForm_Rule_HTML" is not in camel caps format Open
class HTML_QuickForm_Rule_HTML extends HTML_QuickForm_Rule
- Exclude checks
The variable $allowed_tags_student_full_page is not named in camelCase. Open
public static function get_allowed_tags($mode)
{
// Include the allowed tags.
//include __DIR__.'/allowed_tags.inc.php';
global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
- 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 $allowed_tags_student is not named in camelCase. Open
public static function get_allowed_tags($mode)
{
// Include the allowed tags.
//include __DIR__.'/allowed_tags.inc.php';
global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
- 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 $cleaned_html is not named in camelCase. Open
public function validate($html, $mode = NO_HTML)
{
$allowed_tags = self::get_allowed_tags($mode, $fullpage);
$cleaned_html = kses($html, $allowed_tags);
- 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 $allowed_tags is not named in camelCase. Open
public function validate($html, $mode = NO_HTML)
{
$allowed_tags = self::get_allowed_tags($mode, $fullpage);
$cleaned_html = kses($html, $allowed_tags);
- 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 $cleaned_html is not named in camelCase. Open
public function validate($html, $mode = NO_HTML)
{
$allowed_tags = self::get_allowed_tags($mode, $fullpage);
$cleaned_html = kses($html, $allowed_tags);
- 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 $allowed_tags_teacher is not named in camelCase. Open
public static function get_allowed_tags($mode)
{
// Include the allowed tags.
//include __DIR__.'/allowed_tags.inc.php';
global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
- 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 $allowed_tags is not named in camelCase. Open
public function validate($html, $mode = NO_HTML)
{
$allowed_tags = self::get_allowed_tags($mode, $fullpage);
$cleaned_html = kses($html, $allowed_tags);
- 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 $allowed_tags_student_full_page is not named in camelCase. Open
public static function get_allowed_tags($mode)
{
// Include the allowed tags.
//include __DIR__.'/allowed_tags.inc.php';
global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
- 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 $allowed_tags_student is not named in camelCase. Open
public static function get_allowed_tags($mode)
{
// Include the allowed tags.
//include __DIR__.'/allowed_tags.inc.php';
global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
- 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 $allowed_tags_teacher is not named in camelCase. Open
public static function get_allowed_tags($mode)
{
// Include the allowed tags.
//include __DIR__.'/allowed_tags.inc.php';
global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
- 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 $allowed_tags_student is not named in camelCase. Open
public static function get_allowed_tags($mode)
{
// Include the allowed tags.
//include __DIR__.'/allowed_tags.inc.php';
global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
- 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 $allowed_tags_teacher_full_page is not named in camelCase. Open
public static function get_allowed_tags($mode)
{
// Include the allowed tags.
//include __DIR__.'/allowed_tags.inc.php';
global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
- 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 $allowed_tags_teacher is not named in camelCase. Open
public static function get_allowed_tags($mode)
{
// Include the allowed tags.
//include __DIR__.'/allowed_tags.inc.php';
global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
- 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 $allowed_tags_teacher_full_page is not named in camelCase. Open
public static function get_allowed_tags($mode)
{
// Include the allowed tags.
//include __DIR__.'/allowed_tags.inc.php';
global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
- 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 get_allowed_tags is not named in camelCase. Open
public static function get_allowed_tags($mode)
{
// Include the allowed tags.
//include __DIR__.'/allowed_tags.inc.php';
global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
- 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() {
}
}