chamilo/chamilo-lms

View on GitHub
public/main/gradebook/lib/be/surveylink.class.php

Summary

Maintainability
A
0 mins
Test Coverage

The method calc_score uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            // for all the students -> get average
            $rescount = 0;
            $sum = 0;
            $bestResult = 0;

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 assigning values to variables in if clauses and the like (line '175', column '17').
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 unused local variables such as '$courseId'.
Open

            $courseId = $this->getCourseId();

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 '$courseId'.
Open

            $courseId = $this->getCourseId();

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 '$sessionId'.
Open

            $sessionId = $this->get_session_id();

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 property $survey_data is not named in camelCase.
Open

class SurveyLink extends AbstractLink
{
    private $survey_table;
    /** @var \Chamilo\CourseBundle\Entity\CSurvey */
    private $survey_data;

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 property $survey_table is not named in camelCase.
Open

class SurveyLink extends AbstractLink
{
    private $survey_table;
    /** @var \Chamilo\CourseBundle\Entity\CSurvey */
    private $survey_data;

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

Method name "SurveyLink::get_link" is not in camel caps format
Open

    public function get_link()

Variable "survey_data" is not in valid camel caps format
Open

        return $this->survey_data->getCode().': '.self::html_to_text($this->survey_data->getTitle());

Variable "max_score" is not in valid camel caps format
Open

                return [$data['answered'] ? $max_score : 0, $max_score];

Variable "survey_data" is not in valid camel caps format
Open

            $this->survey_data = $survey;

Variable "survey_data" is not in valid camel caps format
Open

        return $this->survey_data->getSubtitle();

Missing function doc comment
Open

    public function get_link()

Variable "course_id" is not in valid camel caps format
Open

        $course = api_get_course_entity($course_id);

Missing function doc comment
Open

    public function needs_max()

Method name "SurveyLink::has_results" is not in camel caps format
Open

    public function has_results()

Variable "tbl_survey" is not in valid camel caps format
Open

        $tbl_survey = Database::get_course_table(TABLE_SURVEY);

Variable "tbl_survey_invitation" is not in valid camel caps format
Open

        $tbl_survey_invitation = Database::get_course_table(TABLE_SURVEY_INVITATION);

Variable "max_score" is not in valid camel caps format
Open

            return [0, $max_score];

Variable "survey_data" is not in valid camel caps format
Open

        if (empty($this->survey_data)) {

Method name "SurveyLink::get_name" is not in camel caps format
Open

    public function get_name()

Method name "SurveyLink::needs_name_and_description" is not in camel caps format
Open

    public function needs_name_and_description()

Variable "tbl_survey" is not in valid camel caps format
Open

                FROM $tbl_survey AS s

Method name "SurveyLink::needs_results" is not in camel caps format
Open

    public function needs_results()

Variable "tbl_survey" is not in valid camel caps format
Open

        $tbl_survey = Database::get_course_table(TABLE_SURVEY);

Variable "ref_id" is not in valid camel caps format
Open

                    s.iid = $ref_id AND

Variable "max_score" is not in valid camel caps format
Open

                return [$data['answered'] ? $max_score : 0, $max_score];

Variable "sql_result" is not in valid camel caps format
Open

            while ($data = Database::fetch_array($sql_result)) {

Variable "max_score" is not in valid camel caps format
Open

                $sum += $data['answered'] ? $max_score : 0;

Method name "SurveyLink::get_type_name" is not in camel caps format
Open

    public function get_type_name()

Method name "SurveyLink::is_allowed_to_change_name" is not in camel caps format
Open

    public function is_allowed_to_change_name()

Missing function doc comment
Open

    public function needs_results()

Variable "course_id" is not in valid camel caps format
Open

        $course_id = $this->getCourseId();

Method name "SurveyLink::get_description" is not in camel caps format
Open

    public function get_description()

Variable "max_score" is not in valid camel caps format
Open

        $max_score = 1;

Variable "get_individual_score" is not in valid camel caps format
Open

        if ($get_individual_score) {

Method name "SurveyLink::is_valid_link" is not in camel caps format
Open

    public function is_valid_link()

Variable "max_score" is not in valid camel caps format
Open

            $sum = $sum / $max_score;

Variable "survey_id" is not in valid camel caps format
Open

                $survey_id = $survey->getIid();

Method name "SurveyLink::get_survey_data" is not in camel caps format
Open

    private function get_survey_data()

Variable "course_id" is not in valid camel caps format
Open

        if (empty($this->course_id)) {

Method name "SurveyLink::needs_max" is not in camel caps format
Open

    public function needs_max()

Variable "sql_result" is not in valid camel caps format
Open

        $sql_result = Database::query($sql);

Variable "ref_id" is not in valid camel caps format
Open

                    s.iid = $ref_id AND

Variable "get_individual_score" is not in valid camel caps format
Open

        if ($get_individual_score) {

Method name "SurveyLink::get_survey_table" is not in camel caps format
Open

    private function get_survey_table()

Variable "sql_result" is not in valid camel caps format
Open

        $sql_result = Database::query($sql);

Variable "sql_result" is not in valid camel caps format
Open

            if ($data = Database::fetch_array($sql_result)) {

Method name "SurveyLink::get_all_links" is not in camel caps format
Open

    public function get_all_links()

Method name "SurveyLink::calc_score" is not in camel caps format
Open

    public function calc_score($studentId = null, $type = null)

Variable "get_individual_score" is not in valid camel caps format
Open

        $get_individual_score = !is_null($studentId);

Variable "survey_data" is not in valid camel caps format
Open

        return $this->survey_data;

Method name "SurveyLink::html_to_text" is not in camel caps format
Open

    private static function html_to_text($string)

Variable "survey_data" is not in valid camel caps format
Open

        return $this->survey_data->getCode().': '.self::html_to_text($this->survey_data->getTitle());

Missing function doc comment
Open

    public function needs_name_and_description()

Variable "ref_id" is not in valid camel caps format
Open

        $ref_id = $this->get_ref_id();

Method name "SurveyLink::get_icon_name" is not in camel caps format
Open

    public function get_icon_name()

Variable "survey_table" is not in valid camel caps format
Open

        return $this->survey_table;

Variable "sql_result" is not in valid camel caps format
Open

        $data = Database::fetch_array($sql_result);

Variable "tbl_survey" is not in valid camel caps format
Open

                FROM $tbl_survey AS s

Missing function doc comment
Open

    public function is_allowed_to_change_name()

Variable "ref_id" is not in valid camel caps format
Open

        $ref_id = $this->get_ref_id();

Variable "tbl_survey_invitation" is not in valid camel caps format
Open

                JOIN $tbl_survey_invitation AS i

Variable "survey_id" is not in valid camel caps format
Open

                    api_get_cidreq_params($this->getCourseId(), $sessionId).'&survey_id='.$survey_id;

Variable "survey_table" is not in valid camel caps format
Open

        $this->survey_table = Database::get_course_table(TABLE_SURVEY);

The variable $course_id is not named in camelCase.
Open

    public function get_all_links()
    {
        if (empty($this->course_id)) {
            exit('Error in get_all_links() : course ID not set');
        }

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 $tbl_survey_invitation is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $max_score is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $survey_id is not named in camelCase.
Open

    public function get_link()
    {
        if ('true' === api_get_setting('survey.hide_survey_reporting_button')) {
            return null;
        }

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 $ref_id is not named in camelCase.
Open

    public function has_results()
    {
        $ref_id = $this->get_ref_id();
        $sessionId = $this->get_session_id();
        $courseId = $this->getCourseId();

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 $tbl_survey is not named in camelCase.
Open

    public function has_results()
    {
        $ref_id = $this->get_ref_id();
        $sessionId = $this->get_session_id();
        $courseId = $this->getCourseId();

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 $ref_id is not named in camelCase.
Open

    public function has_results()
    {
        $ref_id = $this->get_ref_id();
        $sessionId = $this->get_session_id();
        $courseId = $this->getCourseId();

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 $tbl_survey_invitation is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $max_score is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $max_score is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $tbl_survey is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $sql_result is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $max_score is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $sql_result is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $max_score is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $survey_id is not named in camelCase.
Open

    public function get_link()
    {
        if ('true' === api_get_setting('survey.hide_survey_reporting_button')) {
            return null;
        }

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 $tbl_survey is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $sql_result is not named in camelCase.
Open

    public function has_results()
    {
        $ref_id = $this->get_ref_id();
        $sessionId = $this->get_session_id();
        $courseId = $this->getCourseId();

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 $ref_id is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $get_individual_score is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $max_score is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $course_id is not named in camelCase.
Open

    public function get_all_links()
    {
        if (empty($this->course_id)) {
            exit('Error in get_all_links() : course ID not set');
        }

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 $ref_id is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $tbl_survey is not named in camelCase.
Open

    public function has_results()
    {
        $ref_id = $this->get_ref_id();
        $sessionId = $this->get_session_id();
        $courseId = $this->getCourseId();

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 $sql_result is not named in camelCase.
Open

    public function has_results()
    {
        $ref_id = $this->get_ref_id();
        $sessionId = $this->get_session_id();
        $courseId = $this->getCourseId();

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 $get_individual_score is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $get_individual_score is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 $sql_result is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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_type_name is not named in camelCase.
Open

    public function get_type_name()
    {
        return get_lang('Survey');
    }

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 needs_max is not named in camelCase.
Open

    public function needs_max()
    {
        return false;
    }

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 needs_results is not named in camelCase.
Open

    public function needs_results()
    {
        return false;
    }

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 has_results is not named in camelCase.
Open

    public function has_results()
    {
        $ref_id = $this->get_ref_id();
        $sessionId = $this->get_session_id();
        $courseId = $this->getCourseId();

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 get_description is not named in camelCase.
Open

    public function get_description()
    {
        $this->get_survey_data();

        return $this->survey_data->getSubtitle();

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 get_link is not named in camelCase.
Open

    public function get_link()
    {
        if ('true' === api_get_setting('survey.hide_survey_reporting_button')) {
            return null;
        }

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 get_name is not named in camelCase.
Open

    public function get_name()
    {
        $this->get_survey_data();

        return $this->survey_data->getCode().': '.self::html_to_text($this->survey_data->getTitle());

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 is_allowed_to_change_name is not named in camelCase.
Open

    public function is_allowed_to_change_name()
    {
        return false;
    }

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 calc_score is not named in camelCase.
Open

    public function calc_score($studentId = null, $type = null)
    {
        // Note: Max score is assumed to be always 1 for surveys,
        // only student's participation is to be taken into account.
        $max_score = 1;

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 get_all_links is not named in camelCase.
Open

    public function get_all_links()
    {
        if (empty($this->course_id)) {
            exit('Error in get_all_links() : course ID not set');
        }

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 is_valid_link is not named in camelCase.
Open

    public function is_valid_link()
    {
        $sessionId = $this->get_session_id();
        $courseId = $this->getCourseId();

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 needs_name_and_description is not named in camelCase.
Open

    public function needs_name_and_description()
    {
        return false;
    }

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 get_survey_table is not named in camelCase.
Open

    private function get_survey_table()
    {
        $this->survey_table = Database::get_course_table(TABLE_SURVEY);

        return $this->survey_table;

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 get_icon_name is not named in camelCase.
Open

    public function get_icon_name()
    {
        return 'survey';
    }

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 get_survey_data is not named in camelCase.
Open

    private function get_survey_data()
    {
        if (empty($this->survey_data)) {
            $courseId = $this->getCourseId();
            $sessionId = $this->get_session_id();

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 html_to_text is not named in camelCase.
Open

    private static function html_to_text($string)
    {
        return strip_tags($string);
    }

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

There are no issues that match your filters.

Category
Status