chamilo/chamilo-lms

View on GitHub
public/main/inc/lib/skill.visualizer.lib.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused local variables such as '$id'.
Open

                foreach ($this->skills[$skill['parent_id']]['children'] as $id => $sk) {

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

        $brothers = [];

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

        $count = 0;

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

        $skill_count = sizeof($this->skills);

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

            $childs = isset($skill['children']) ? count($skill['children']) : 0;

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

                $max = isset($this->skills[$skill['parent_id']]['children']) ? count($this->skills[$skill['parent_id']]['children']) : 0;

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 method add_item uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            if (1 == $skill['done_by_user']) {
                $class = 'done_window';
                $end_point = 'doneEndpoint';
            } else {

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

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

            } else {
                $max = isset($this->skills[$skill['parent_id']]['children']) ? count($this->skills[$skill['parent_id']]['children']) : 0;
                foreach ($this->skills[$skill['parent_id']]['children'] as $id => $sk) {
                    if ($skill['id'] == $sk['id']) {
                        break;

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

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

            } else {
                $end_point = 'defaultEndpoint';
            }

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

The property $space_between_blocks_y is not named in camelCase.
Open

class SkillVisualizer
{
    public $block_size = 120; //see CSS window class
    public $canvas_x = 1024;
    public $canvas_y = 800;

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

class SkillVisualizer
{
    public $block_size = 120; //see CSS window class
    public $canvas_x = 1024;
    public $canvas_y = 800;

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

class SkillVisualizer
{
    public $block_size = 120; //see CSS window class
    public $canvas_x = 1024;
    public $canvas_y = 800;

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

class SkillVisualizer
{
    public $block_size = 120; //see CSS window class
    public $canvas_x = 1024;
    public $canvas_y = 800;

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

class SkillVisualizer
{
    public $block_size = 120; //see CSS window class
    public $canvas_x = 1024;
    public $canvas_y = 800;

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

class SkillVisualizer
{
    public $block_size = 120; //see CSS window class
    public $canvas_x = 1024;
    public $canvas_y = 800;

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

class SkillVisualizer
{
    public $block_size = 120; //see CSS window class
    public $canvas_x = 1024;
    public $canvas_y = 800;

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

class SkillVisualizer
{
    public $block_size = 120; //see CSS window class
    public $canvas_x = 1024;
    public $canvas_y = 800;

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

Member variable "space_between_blocks_y" is not in valid camel caps format
Open

    public $space_between_blocks_y = 150;

Missing parameter name
Open

     * @param $position

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

            $end_point = 'editEndpoint';

Member variable "canvas_x" is not in valid camel caps format
Open

    public $canvas_x = 1024;

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

        $this->center_x = intval($this->offset_x + $this->canvas_x / 2 - $this->block_size / 2);

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

                    $my_count++;

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

        $end_point = 'readEndpoint';

Member variable "block_size" is not in valid camel caps format
Open

    public $block_size = 120; //see CSS window class

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

        $this->html .= '<div id="block_'.$block_id.'" class = "open_block window '.$extra_class.'  '.$class.'" style = "top:'.$position['y'].'px; left:'.$position['x'].'px;">';

Method name "SkillVisualizer::display_html" is not in camel caps format
Open

    public function display_html()

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

        $skill_count = sizeof($this->skills);

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

            $this->add_item($skill, ['x' => $this->offset_x + $x, 'y' => $this->offset_y + $y]);

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

        $this->js .= 'var e'.$block_id.' = prepare("block_'.$block_id.'",  '.$end_point.');'."\n";

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

        $this->js .= 'var e'.$block_id.' = prepare("block_'.$block_id.'",  '.$end_point.');'."\n";

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

        $block_id = $skill['id'];

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

                $x = $this->canvas_x / 2 - $this->block_size / 2;

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

                $x = $my_count * $this->space_between_blocks_x + $parent_x + $this->block_size - ($this->canvas_x / 2);

Member variable "center_x" is not in valid camel caps format
Open

    public $center_x = null;

Method name "SkillVisualizer::return_html" is not in camel caps format
Open

    public function return_html()

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

        $content .= Display::url(get_lang('Edit'), '#', ['id' => 'edit_block_'.$block_id, 'class' => 'edit_block btn']);

Missing function doc comment
Open

    public function return_js()

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

        $block_id = $skill['id'];

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

                $parent_x = isset($this->skills[$skill['parent_id']]['x']) ? $this->skills[$skill['parent_id']]['x'] : 0;

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

        $this->js .= 'jsPlumb.connect({source: e'.$block_id.', target:e'.$skill['parent_id'].'});'."\n";

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

        $this->center_x = intval($this->offset_x + $this->canvas_x / 2 - $this->block_size / 2);

Method name "SkillVisualizer::prepare_skill_box" is not in camel caps format
Open

    public function prepare_skill_box($skill, $position, $class)

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

            $my_count = 0;

Method name "SkillVisualizer::get_js" is not in camel caps format
Open

    private function get_js()

Member variable "offset_x" is not in valid camel caps format
Open

    public $offset_x = 0;

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

        $this->center_x = intval($this->offset_x + $this->canvas_x / 2 - $this->block_size / 2);

Missing parameter name
Open

     * @param $class

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

                $end_point = 'defaultEndpoint';

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

        $this->js .= 'var e'.$skill['parent_id'].' = prepare("block_'.$skill['parent_id'].'",  '.$end_point.');'."\n";

Member variable "offset_y" is not in valid camel caps format
Open

    public $offset_y = 50;

Method name "SkillVisualizer::display_js" is not in camel caps format
Open

    public function display_js()

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

                $end_point = 'doneEndpoint';

Member variable "canvas_y" is not in valid camel caps format
Open

    public $canvas_y = 800;

Missing parameter name
Open

     * @param $skills

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

            $extra_class = 'second_window';

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

            $y = $skill['level'] * $this->space_between_blocks_y;

Method name "SkillVisualizer::get_html" is not in camel caps format
Open

    private function get_html()

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

            $parent_x = 0;

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

                $x = $this->canvas_x / 2 - $this->block_size / 2;

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

        $this->js .= 'var e'.$block_id.' = prepare("block_'.$block_id.'",  '.$end_point.');'."\n";

Member variable "space_between_blocks_x" is not in valid camel caps format
Open

    public $space_between_blocks_x = 100;

Missing parameter name
Open

     * @param $skill

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

                $x = $my_count * $this->space_between_blocks_x + $parent_x + $this->block_size - ($this->canvas_x / 2);

Method name "SkillVisualizer::return_js" is not in camel caps format
Open

    public function return_js()

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

            $this->add_item($skill, ['x' => $this->offset_x + $x, 'y' => $this->offset_y + $y]);

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

        $extra_class = 'third_window';

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

        $this->html .= '<div id="block_'.$block_id.'" class = "open_block window '.$extra_class.'  '.$class.'" style = "top:'.$position['y'].'px; left:'.$position['x'].'px;">';

Missing function doc comment
Open

    public function return_html()

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

                $x = $my_count * $this->space_between_blocks_x + $parent_x + $this->block_size - ($this->canvas_x / 2);

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

        $this->center_x = intval($this->offset_x + $this->canvas_x / 2 - $this->block_size / 2);

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

        $content .= Display::url('+', '#', ['id' => 'edit_block_'.$block_id, 'class' => 'edit_block btn']);

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

                $x = $my_count * $this->space_between_blocks_x + $parent_x + $this->block_size - ($this->canvas_x / 2);

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

                $x = $my_count * $this->space_between_blocks_x + $parent_x + $this->block_size - ($this->canvas_x / 2);

Method name "SkillVisualizer::add_item" is not in camel caps format
Open

    private function add_item($skill, $position)

The variable $my_count is not named in camelCase.
Open

    public function return_html()
    {
        if (empty($this->skills)) {
            return '';
        }

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

    private function add_item($skill, $position)
    {
        $block_id = $skill['id'];
        $end_point = 'readEndpoint';
        $class = 'default_window';

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

    private function add_item($skill, $position)
    {
        $block_id = $skill['id'];
        $end_point = 'readEndpoint';
        $class = 'default_window';

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

    public function prepare_skill_box($skill, $position, $class)
    {
        $block_id = $skill['id'];

        $extra_class = 'third_window';

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

    private function add_item($skill, $position)
    {
        $block_id = $skill['id'];
        $end_point = 'readEndpoint';
        $class = 'default_window';

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

    public function prepare_skill_box($skill, $position, $class)
    {
        $block_id = $skill['id'];

        $extra_class = 'third_window';

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

    private function add_item($skill, $position)
    {
        $block_id = $skill['id'];
        $end_point = 'readEndpoint';
        $class = 'default_window';

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

    private function add_item($skill, $position)
    {
        $block_id = $skill['id'];
        $end_point = 'readEndpoint';
        $class = 'default_window';

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

    public function return_html()
    {
        if (empty($this->skills)) {
            return '';
        }

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

    public function return_html()
    {
        if (empty($this->skills)) {
            return '';
        }

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

    private function add_item($skill, $position)
    {
        $block_id = $skill['id'];
        $end_point = 'readEndpoint';
        $class = 'default_window';

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

    private function add_item($skill, $position)
    {
        $block_id = $skill['id'];
        $end_point = 'readEndpoint';
        $class = 'default_window';

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

    public function prepare_skill_box($skill, $position, $class)
    {
        $block_id = $skill['id'];

        $extra_class = 'third_window';

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

    public function prepare_skill_box($skill, $position, $class)
    {
        $block_id = $skill['id'];

        $extra_class = 'third_window';

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

    public function return_html()
    {
        if (empty($this->skills)) {
            return '';
        }

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

    public function prepare_skill_box($skill, $position, $class)
    {
        $block_id = $skill['id'];

        $extra_class = 'third_window';

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

    private function add_item($skill, $position)
    {
        $block_id = $skill['id'];
        $end_point = 'readEndpoint';
        $class = 'default_window';

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

    public function return_html()
    {
        if (empty($this->skills)) {
            return '';
        }

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

    private function add_item($skill, $position)
    {
        $block_id = $skill['id'];
        $end_point = 'readEndpoint';
        $class = 'default_window';

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

    private function add_item($skill, $position)
    {
        $block_id = $skill['id'];
        $end_point = 'readEndpoint';
        $class = 'default_window';

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

    public function prepare_skill_box($skill, $position, $class)
    {
        $block_id = $skill['id'];

        $extra_class = 'third_window';

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

    public function prepare_skill_box($skill, $position, $class)
    {
        $block_id = $skill['id'];

        $extra_class = 'third_window';

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

    public function return_html()
    {
        if (empty($this->skills)) {
            return '';
        }

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

    public function return_html()
    {
        if (empty($this->skills)) {
            return '';
        }

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

    public function prepare_skill_box($skill, $position, $class)
    {
        $block_id = $skill['id'];

        $extra_class = 'third_window';

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

    public function display_html()
    {
        echo $this->return_html();
    }

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

    public function display_js()
    {
        echo $this->return_js();
    }

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

    private function get_js()
    {
        return $this->js;
    }

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

    public function return_js()
    {
        return $this->get_js();
    }

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

    private function get_html()
    {
        return $this->html;
    }

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

    public function return_html()
    {
        if (empty($this->skills)) {
            return '';
        }

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

    private function add_item($skill, $position)
    {
        $block_id = $skill['id'];
        $end_point = 'readEndpoint';
        $class = 'default_window';

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