The method __construct has 10 parameters. Consider reducing the number of parameters to less than 10. Open
public function __construct(
$id,
$question,
$description,
$ponderation,
- Exclude checks
Avoid using undefined variables such as '$itemsToAdd' which will lead to PHP notices. Open
$itemsToAdd[] = $pictureId;
- 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 '$itemsToAdd' which will lead to PHP notices. Open
$courseBuilder->build_documents(api_get_session_id(), $courseId, false, $itemsToAdd);
- 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 '$itemsToAdd' which will lead to PHP notices. Open
$itemsToAdd[] = $parent['id'];
- 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
The property $quiz_type is not named in camelCase. Open
class QuizQuestion extends Resource
{
/**
* The question.
*/
- 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
The parameter $question_category is not named in camelCase. Open
public function __construct(
$id,
$question,
$description,
$ponderation,
- 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
The parameter $answer_text is not named in camelCase. Open
public function add_answer(
$answer_id,
$answer_text,
$correct,
$comment,
- 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
The parameter $hotspot_type is not named in camelCase. Open
public function add_answer(
$answer_id,
$answer_text,
$correct,
$comment,
- 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
The property $question_category is not named in camelCase. Open
class QuizQuestion extends Resource
{
/**
* The question.
*/
- 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
The parameter $hotspot_coordinates is not named in camelCase. Open
public function add_answer(
$answer_id,
$answer_text,
$correct,
$comment,
- 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
The parameter $answer_id is not named in camelCase. Open
public function add_answer(
$answer_id,
$answer_text,
$correct,
$comment,
- 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
The variable $question_category is not named in camelCase. Open
public function __construct(
$id,
$question,
$description,
$ponderation,
- 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 $answer_text is not named in camelCase. Open
public function add_answer(
$answer_id,
$answer_text,
$correct,
$comment,
- 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 $hotspot_type is not named in camelCase. Open
public function add_answer(
$answer_id,
$answer_text,
$correct,
$comment,
- 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 $answer_id is not named in camelCase. Open
public function add_answer(
$answer_id,
$answer_text,
$correct,
$comment,
- 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 $hotspot_coordinates is not named in camelCase. Open
public function add_answer(
$answer_id,
$answer_text,
$correct,
$comment,
- 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 add_answer is not named in camelCase. Open
public function add_answer(
$answer_id,
$answer_text,
$correct,
$comment,
- 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 add_option is not named in camelCase. Open
public function add_option($option)
{
$this->question_options[$option->obj->id] = $option;
}
- 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() {
}
}