chamilo/chamilo-lms

View on GitHub
public/plugin/userremoteservice/src/user_remote_service_plugin.class.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '204', column '21').
Open

        $form = new FormValidator('deletionForm');

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '236', column '26').
Open

            $table = new HTML_Table('class="table"');

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '184', column '21').
Open

        $form = new FormValidator('creationForm');

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

Multi-line function call not indented correctly; expected 8 spaces but found 12
Open

            )->getCustomUserRedirectURL($userInfo['id'], $this->salt());

Method name "UserRemoteServicePlugin::get_hide_link_from_navigation_menu" is not in camel caps format
Open

    public function get_hide_link_from_navigation_menu()

Missing class doc comment
Open

class UserRemoteServicePlugin extends Plugin

Multi-line function call not indented correctly; expected 12 spaces but found 16
Open

                $this->getActiveServiceId()

The 'get_hide_link_from_navigation_menu()' method which returns a boolean should be named 'is...()' or 'has...()'
Open

    public function get_hide_link_from_navigation_menu()
    {
        return $this->get('hide_link_from_navigation_menu');
    }

BooleanGetMethodName

Since: 0.2

Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.

Example

class Foo {
    /**
     * @return boolean
     */
    public function getFoo() {} // bad
    /**
     * @return bool
     */
    public function isFoo(); // ok
    /**
     * @return boolean
     */
    public function getFoo($bar); // ok, unless checkParameterizedMethods=true
}

Source https://phpmd.org/rules/naming.html#booleangetmethodname

Multi-line function call not indented correctly; expected 8 spaces but found 12
Open

            )->getCustomUserRedirectURL($userInfo['id'], $this->salt());

Multi-line function call not indented correctly; expected 12 spaces but found 16
Open

                $this->getActiveServiceId()

The method get_hide_link_from_navigation_menu is not named in camelCase.
Open

    public function get_hide_link_from_navigation_menu()
    {
        return $this->get('hide_link_from_navigation_menu');
    }

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