iMattPro/abbc3

View on GitHub
controller/acp_controller.php

Summary

Maintainability
A
0 mins
Test Coverage

The method __construct has 10 parameters. Consider reducing the number of parameters to less than 10.
Open

    public function __construct(cache $cache, config $config, db_text $db_text, db $db, ext_manager $ext_manager, language $language, request $request, template $template, $parser_key, $renderer_key)
    {
        $this->cache = $cache;
        $this->config = $config;
        $this->config_text = $db_text;
Severity: Minor
Found in controller/acp_controller.php by phpmd

Missing class import via use statement (line '104', column '15').
Open

                throw new \RuntimeException($this->language->lang('FORM_INVALID'), E_USER_WARNING);
Severity: Minor
Found in controller/acp_controller.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

Missing class import via use statement (line '149', column '14').
Open

            throw new \RuntimeException(implode('<br>', $this->errors), E_USER_WARNING);
Severity: Minor
Found in controller/acp_controller.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

Remove error control operator '@' on line 224.
Open

    protected function valid_url($url)
    {
        $headers = function_exists('get_headers') ? @get_headers($url) : false;
        return !$headers || stripos($headers[0], '200 OK') !== false;
    }
Severity: Minor
Found in controller/acp_controller.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

Missing class import via use statement (line '152', column '13').
Open

        throw new \RuntimeException($this->language->lang('CONFIG_UPDATED'), E_USER_NOTICE);
Severity: Minor
Found in controller/acp_controller.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

There are no issues that match your filters.

Category
Status