controller/acp_controller.php
The method __construct has 10 parameters. Consider reducing the number of parameters to less than 10. Open
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;
- Exclude checks
Missing class import via use statement (line '104', column '15'). Open
Open
throw new \RuntimeException($this->language->lang('FORM_INVALID'), E_USER_WARNING);
- Read upRead up
- Exclude checks
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
Open
throw new \RuntimeException(implode('<br>', $this->errors), E_USER_WARNING);
- Read upRead up
- Exclude checks
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
Open
protected function valid_url($url)
{
$headers = function_exists('get_headers') ? @get_headers($url) : false;
return !$headers || stripos($headers[0], '200 OK') !== false;
}
- Read upRead up
- Exclude checks
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
Open
throw new \RuntimeException($this->language->lang('CONFIG_UPDATED'), E_USER_NOTICE);
- Read upRead up
- Exclude checks
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();
}