Missing class import via use statement (line '74', column '37'). Open
$this->answer = new ScormAnswerMultipleChoice($this->id);
- 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 '117', column '37'). Open
$this->answer = new ScormAnswerHotspot($this->id);
- 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 '91', column '37'). Open
$this->answer = new ScormAnswerMatching($this->id);
- 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 '112', column '37'). Open
$this->answer = new ScormAnswerHotspot($this->id);
- 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 '56', column '31'). Open
$assessmentItem = new ScormAssessmentItem($this);
- 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 '127', column '37'). Open
$this->answer = new ScormAnswerMultipleChoice($this->id);
- 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 '107', column '37'). Open
$this->answer = new ScormAnswerMultipleChoice($this->id);
- 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 '68', column '37'). Open
$this->answer = new ScormAnswerMultipleChoice($this->id);
- 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 '156', column '23'). Open
throw new \Exception('Question not supported. Exercise: '.$this->selectTitle());
- 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 '79', column '37'). Open
$this->answer = new ScormAnswerTrueFalse($this->id);
- 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 '102', column '37'). Open
$this->answer = new ScormAnswerHotspot($this->id);
- 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 '84', column '37'). Open
$this->answer = new ScormAnswerFillInBlanks($this->id);
- 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 '97', column '37'). Open
$this->answer = new ScormAnswerFree($this->id);
- 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 '132', column '37'). Open
$this->answer = new stdClass();
- 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 export uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
throw new \Exception('Question not supported. Exercise: '.$this->selectTitle());
}
- 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 parameters such as '$form'. Open
public function createAnswersForm($form)
- 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 parameters such as '$form'. Open
public function processAnswersCreation($form, $exercise)
- 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 parameters such as '$exercise'. Open
public function processAnswersCreation($form, $exercise)
- 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
The property $js_id is not named in camelCase. Open
class ScormQuestion extends Question
{
public $js_id;
public $answer;
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
Variable "js_id" is not in valid camel caps format Open
$this->answer->questionJSId = $this->js_id;
- Exclude checks
Variable "js_id" is not in valid camel caps format Open
$this->answer->questionJSId = $this->js_id;
- Exclude checks
Variable "js_id" is not in valid camel caps format Open
$this->answer->questionJSId = $this->js_id;
- Exclude checks
Variable "js_id" is not in valid camel caps format Open
$this->answer->questionJSId = $this->js_id;
- Exclude checks
Variable "js_id" is not in valid camel caps format Open
$this->answer->questionJSId = $this->js_id;
- Exclude checks
Member variable "js_id" is not in valid camel caps format Open
public $js_id;
- Exclude checks
Variable "js_id" is not in valid camel caps format Open
$this->js_id = $jsId;
- Exclude checks
Variable "js_id" is not in valid camel caps format Open
$this->answer->questionJSId = $this->js_id;
- Exclude checks
Variable "js_id" is not in valid camel caps format Open
$this->answer->questionJSId = $this->js_id;
- Exclude checks
Variable "js_id" is not in valid camel caps format Open
$this->answer->questionJSId = $this->js_id;
- Exclude checks
Variable "js_id" is not in valid camel caps format Open
$this->answer->questionJSId = $this->js_id;
- Exclude checks
Missing function doc comment Open
public function createAnswersForm($form)
- Exclude checks
Missing function doc comment Open
public function processAnswersCreation($form, $exercise)
- Exclude checks
Variable "js_id" is not in valid camel caps format Open
questions.push('.$this->js_id.');
- Exclude checks
Variable "js_id" is not in valid camel caps format Open
$this->answer->questionJSId = $this->js_id;
- Exclude checks
Variable "js_id" is not in valid camel caps format Open
$this->answer->questionJSId = $this->js_id;
- Exclude checks
Variable "js_id" is not in valid camel caps format Open
$this->answer->questionJSId = $this->js_id;
- Exclude checks
Variable "js_id" is not in valid camel caps format Open
$("#question_'.$this->js_id.'").shuffleRows();
- Exclude checks
Variable "js_id" is not in valid camel caps format Open
$js .= 'questions_score_max['.$this->js_id.'] = '.$weight.';';
- Exclude checks