Missing class import via use statement (line '173', column '30'). Open
$scormQuestion = new ScormQuestion();
- 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 unused local variables such as '$charset'. Open
global $charset;
- 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 '$em'. Open
$em = Database::getManager();
- 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
Method name "ScormExercise::end_js" is not in camel caps format Open
public function end_js()
- Exclude checks
Method name "ScormExercise::start_header" is not in camel caps format Open
public function start_header()
- Exclude checks
Method name "ScormExercise::end_body" is not in camel caps format Open
public function end_body()
- Exclude checks
Method name "ScormExercise::end_header" is not in camel caps format Open
private function end_header()
- Exclude checks
Method name "ScormExercise::start_body" is not in camel caps format Open
public function start_body()
- Exclude checks
Method name "ScormExercise::end_page" is not in camel caps format Open
public function end_page()
- Exclude checks
Method name "ScormExercise::start_js" is not in camel caps format Open
private function start_js()
- Exclude checks
Method name "ScormExercise::common_js" is not in camel caps format Open
public function common_js()
- Exclude checks
The method common_js is not named in camelCase. Open
public function common_js()
{
$js = file_get_contents(api_get_path(SYS_CODE_PATH).'exercise/export/scorm/common.js');
return $js."\n";
- 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 end_page is not named in camelCase. Open
public function end_page()
{
return '</html>';
}
- 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 end_js is not named in camelCase. Open
public function end_js()
{
return '</script>';
}
- 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 start_js is not named in camelCase. Open
private function start_js()
{
return '<script>';
}
- 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 end_header is not named in camelCase. Open
private function end_header()
{
return '</head>';
}
- 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 start_body is not named in camelCase. Open
public function start_body()
{
return '<body>'.
'<h1>'.$this->exercise->selectTitle().'</h1><p>'.$this->exercise->selectDescription().'</p>'.
'<form id="chamilo_scorm_form" method="post" action="">'.
- 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 end_body is not named in camelCase. Open
public function end_body()
{
$button = '<input
id="chamilo_scorm_submit"
class="btn btn--primary"
- 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 start_header is not named in camelCase. Open
public function start_header()
{
return '<head>';
}
- 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() {
}
}