Method getFormConfirm
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFormConfirm(): \XoopsThemeForm
{
$moduleDirName = \basename(__DIR__);
$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
//in order to be accessable from user and admin area this should be place in language common.php
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(array $hiddens, string $action, string $object, string $title = '', string $label = '')
Missing class import via use statement (line '102', column '27'). Open
$buttonTray = new \XoopsFormElementTray('');
- 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 '96', column '31'). Open
$form->addElement(new \XoopsFormLabel($this->label, $this->object));
- 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 '103', column '37'). Open
$buttonTray->addElement(new \XoopsFormButton('', 'confirm_submit', \_YES, 'submit'));
- 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 '104', column '27'). Open
$buttonBack = new \XoopsFormButton('', 'confirm_back', \_NO, 'button');
- 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 '99', column '35'). Open
$form->addElement(new \XoopsFormHidden($key, $value));
- 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 '94', column '21'). Open
$form = new \XoopsThemeForm($this->title, 'formConfirm', $this->action, 'post', true);
- 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 '101', column '31'). Open
$form->addElement(new \XoopsFormHidden('ok', 1));
- 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
Avoid using static access to class '\Xmf\Request' in method 'getFormConfirm'. Open
$this->action = \Xmf\Request::getString('REQUEST_URI', '', 'SERVER');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 43 and the first side effect is on line 38. Open
<?php
- Exclude checks