chamilo/chamilo-lms

View on GitHub
public/main/dashboard/dashboard_controller.php

Summary

Maintainability
A
0 mins
Test Coverage

The method display() has an NPath complexity of 640. The configured NPath complexity threshold is 200.
Open

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

Missing class import via use statement (line '36', column '20').
Open

        $tpl = new Template(get_lang('Dashboard'));

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

        } else {
            $user_id = api_get_user_id();
            $blockList = DashboardManager::display_user_dashboard_list($user_id);
            $tpl->assign('blocklist', $blockList);
        }

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

        } else {
            $link_list_view = '<a href="'.api_get_self().'?view=list">'.
                Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Edit blocks')).'</a>';
        }

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

class DashboardController
{
    private $user_id;

    /**

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 "tmp_columns" is not in valid camel caps format
Open

                    $tmp_columns = [];

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

        $user_id = $this->user_id;

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

                        $is_block_visible_for_user = $obj->is_block_visible_for_user($user_id);

Method name "DashboardController::store_user_block" is not in camel caps format
Open

    public function store_user_block()

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

            $enabled_blocks = $_POST['enabled_blocks'];

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

                    $obj = new $controller_class($user_id);

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

                $filename_controller = $path.'.class.php';

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

                require_once $dashboard_plugin_path.$filename_controller;

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

        $link_blocks_view = $link_list_view = null;

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

            $configuration_link = '<a href="'.api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Plugins">'

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

                        $tmp_columns[] = $block['column'];

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

        $this->user_id = api_get_user_id();

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

                if (class_exists($controller_class)) {

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

        $link_blocks_view = $link_list_view = null;

Method name "DashboardController::close_user_block" is not in camel caps format
Open

    public function close_user_block($path)

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

                        if (in_array($block['column'], $tmp_columns)) {

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

            $user_id = api_get_user_id();

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

            DashboardManager::store_user_blocks($this->user_id, $enabled_blocks, $columns);

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

        $configuration_link = null;

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

        $actions = Display::toolbarAction('toolbar', [$link_blocks_view.$link_list_view.$configuration_link]);

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

            $blockList = DashboardManager::display_user_dashboard_list($user_id);

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

        $user_block_data = DashboardManager::get_user_block_data($user_id);

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

        $user_blocks_id = array_keys($user_block_data);

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

            foreach ($dashboard_blocks as $block) {

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

                    $blocks[$path]['column'] = $user_block_data[$block['id']]['column'];

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

        $user_block_data = DashboardManager::get_user_block_data($user_id);

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

        $user_blocks_id = array_keys($user_block_data);

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

                if (!in_array($block['id'], $user_blocks_id)) {

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

                require_once $dashboard_plugin_path.$filename_controller;

Missing class doc comment
Open

class DashboardController

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

        if (!empty($dashboard_blocks)) {

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

        DashboardManager::close_user_block($this->user_id, $path);

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

                        $is_block_visible_for_user = $obj->is_block_visible_for_user($user_id);

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

            $link_blocks_view = '<a href="'.api_get_self().'?view=blocks">'.

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

        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

                $dashboard_plugin_path = api_get_path(SYS_PLUGIN_PATH).'dashboard/'.$path.'/';

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

        $actions = Display::toolbarAction('toolbar', [$link_blocks_view.$link_list_view.$configuration_link]);

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

                $controller_class = $block['controller'];

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

                    $obj = new $controller_class($user_id);

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

                        if (!$is_block_visible_for_user) {

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

            DashboardManager::store_user_blocks($this->user_id, $enabled_blocks, $columns);

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

        $user_id = $this->user_id;

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

            $link_list_view = '<a href="'.api_get_self().'?view=list">'.

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

        $actions = Display::toolbarAction('toolbar', [$link_blocks_view.$link_list_view.$configuration_link]);

The variable $dashboard_blocks is not named in camelCase.
Open

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function store_user_block()
    {
        if ("POST" == strtoupper($_SERVER['REQUEST_METHOD'])) {
            $enabled_blocks = $_POST['enabled_blocks'];
            $columns = $_POST['columns'];

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function store_user_block()
    {
        if ("POST" == strtoupper($_SERVER['REQUEST_METHOD'])) {
            $enabled_blocks = $_POST['enabled_blocks'];
            $columns = $_POST['columns'];

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

    public function display()
    {
        $tpl = new Template(get_lang('Dashboard'));
        $user_id = $this->user_id;
        $dashboard_blocks = DashboardManager::get_enabled_dashboard_blocks();

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

    public function store_user_block()
    {
        if ("POST" == strtoupper($_SERVER['REQUEST_METHOD'])) {
            $enabled_blocks = $_POST['enabled_blocks'];
            $columns = $_POST['columns'];

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

    public function close_user_block($path)
    {
        DashboardManager::close_user_block($this->user_id, $path);
        Display::addFlash(Display::return_message(get_lang('Saved')));
        header('Location: '.api_get_path(WEB_CODE_PATH).'dashboard/index.php');

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