mambax7/gbook

View on GitHub

Showing 307 of 307 total issues

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

    }

There must be one blank line after the last USE statement; 0 found;
Open

use XoopsModules\Gbook\Helper;

There must be one blank line after the last USE statement; 3 found;
Open

use XoopsDatabaseFactory;
Severity: Minor
Found in class/Helper.php by phpcodesniffer

There must be one USE keyword per declaration
Open

use XoopsModules\Gbook\{
Severity: Minor
Found in admin/index.php by phpcodesniffer

Missing class import via use statement (line '96', column '24').
Open

        $dirInfo = new \SplFileInfo($src);
Severity: Minor
Found in class/Common/FilesManagement.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 '101', column '33').
Open

                $fileInfo = new \SplFileInfo("{$src}/{$v}");
Severity: Minor
Found in class/Common/FilesManagement.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 '145', column '25').
Open

        $iterator = new \DirectoryIterator($src);
Severity: Minor
Found in class/Common/FilesManagement.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 '180', column '35').
Open

                $descEditor = new \XoopsFormEditor(\ucfirst($options['name']), $helper->getConfig('editorAdmin'), $options, $nohtml = false, $onfailure = 'textarea');
Severity: Minor
Found in class/Common/SysUtility.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 '125', column '21').
Open

    $criteria = new \CriteriaCompo();
Severity: Minor
Found in testdata/index.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 '231', column '25').
Open

        $iterator = new \DirectoryIterator($src);
Severity: Minor
Found in class/Common/FilesManagement.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 method truncateHtml has a boolean flag argument $exact, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true): string
Severity: Minor
Found in class/Common/SysUtility.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

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

    public static function recurseCopy($src, $dst): void
    {
        $dir = \opendir($src);
        //        @mkdir($dst);
        if (!@\mkdir($dst) && !\is_dir($dst)) {
Severity: Minor
Found in class/Common/FilesManagement.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 '63', column '33').
Open

                $fileInfo = new \SplFileInfo($templateDirectory . $v);
Severity: Minor
Found in include/onupdate.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 '182', column '35').
Open

                $descEditor = new \XoopsFormEditor(\ucfirst($options['name']), $helper->getConfig('editorUser'), $options, $nohtml = false, $onfailure = 'textarea');
Severity: Minor
Found in class/Common/SysUtility.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 '76', column '33').
Open

                $fileInfo = new \SplFileInfo($templateDirectory . $v);
Severity: Minor
Found in include/onupdate.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 '188', column '25').
Open

        $iterator = new \DirectoryIterator($src);
Severity: Minor
Found in class/Common/FilesManagement.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 '126', column '24').
Open

    $criteria->add(new \Criteria('gperm_modid', $helper->getModule()->getVar('mid')));
Severity: Minor
Found in testdata/index.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 '57', column '24').
Open

        $dirInfo = new \SplFileInfo($old_dir);
Severity: Minor
Found in include/onuninstall.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 '34', column '31').
Open

                    throw new \RuntimeException(\sprintf('Unable to create the %s directory', $folder));
Severity: Minor
Found in class/Common/FilesManagement.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 '63', column '23').
Open

            throw new \RuntimeException('The directory ' . $dst . ' could not be created.');
Severity: Minor
Found in class/Common/FilesManagement.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

Severity
Category
Status
Source
Language