detain/myadmin-openvz-vps

View on GitHub
src/Plugin.php

Summary

Maintainability
A
1 hr
Test Coverage

Method getSettings has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getSettings(GenericEvent $event)
    {
        /**
         * @var \MyAdmin\Settings $settings
         **/
Severity: Minor
Found in src/Plugin.php - About 1 hr to fix

    Missing class import via use statement (line '115', column '31').
    Open

                    $smarty = new \TFSmarty();
    Severity: Minor
    Found in src/Plugin.php by phpmd

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

        public static function getQueue(GenericEvent $event)
        {
            if (in_array($event['type'], [get_service_define('OPENVZ'), get_service_define('SSD_OPENVZ')])) {
                $serviceInfo = $event->getSubject();
                $settings = get_module_settings(self::$module);
    Severity: Minor
    Found in src/Plugin.php by phpmd

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

        public static function getQueue(GenericEvent $event)
        {
            if (in_array($event['type'], [get_service_define('OPENVZ'), get_service_define('SSD_OPENVZ')])) {
                $serviceInfo = $event->getSubject();
                $settings = get_module_settings(self::$module);
    Severity: Minor
    Found in src/Plugin.php by phpmd

    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

    There are no issues that match your filters.

    Category
    Status