TikiWiki/tiki-manager

View on GitHub

Showing 2,255 of 2,255 total issues

Missing class import via use statement (line '782', column '23').
Open

            throw new \Exception('Unable to update version. This is a blank instance');
Severity: Minor
Found in src/Application/Instance.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 backup has a boolean flag argument $direct, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function backup($direct = false, $full = true, $onlyCode = false)
Severity: Minor
Found in src/Application/Instance.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

The method __construct has a boolean flag argument $direct, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function __construct($instance, $direct = false, $full = true, $onlyCode = false)
Severity: Minor
Found in src/Application/Backup.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

Missing class import via use statement (line '283', column '23').
Open

            throw new \RuntimeException('Unsuccessful database backup. Aborting.');
Severity: Minor
Found in src/Application/Backup.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 __construct has a boolean flag argument $enabled, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function __construct(string $time, string $command, bool $enabled = true)
Severity: Minor
Found in src/Application/Instance/CronJob.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 103.
Open

    public function detectBackupPerm($path): array
    {
        $user = $group = [];

        if (extension_loaded('posix')) {

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

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

    public function detectBackupPerm($path): array
    {
        $user = $group = [];

        if (extension_loaded('posix')) {

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 '83', column '23').
Open

            throw new \Exception('Operation not supported, only Local or SSH access is available');

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 restore has a boolean flag argument $clone, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function restore($srcInstance, $archive, $clone = false, $checksumCheck = false, $direct = false, $onlyData = false, $onlyCode = false, $options = [], $skipSystemConfigurationCheck = false, $allowCommonParents = 0)
Severity: Minor
Found in src/Application/Instance.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

The method restore has a boolean flag argument $onlyCode, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function restore($srcInstance, $archive, $clone = false, $checksumCheck = false, $direct = false, $onlyData = false, $onlyCode = false, $options = [], $skipSystemConfigurationCheck = false, $allowCommonParents = 0)
Severity: Minor
Found in src/Application/Instance.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

The method __construct has a boolean flag argument $onlyCode, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function __construct($instance, $direct = false, $full = true, $onlyCode = false)
Severity: Minor
Found in src/Application/Backup.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

Missing class import via use statement (line '49', column '23').
Open

            throw new \Exception('Operation not supported, only Local or SSH access is available');

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 backup has a boolean flag argument $full, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function backup($direct = false, $full = true, $onlyCode = false)
Severity: Minor
Found in src/Application/Instance.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

Missing class import via use statement (line '1275', column '23').
Open

            throw new \Exception('Database configuration file not found.');
Severity: Minor
Found in src/Application/Instance.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 45.
Open

    public function detectBackupPerm($path): array
    {
        $user = $group = [];

        if (extension_loaded('posix')) {

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

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

    public function detectBackupPerm($path): array
    {
        $user = $group = [];

        if (extension_loaded('posix')) {

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

The method create has a boolean flag argument $skipArchive, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function create($skipArchive = false, $backupDir = null)
Severity: Minor
Found in src/Application/Backup.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

The method __construct has a boolean flag argument $full, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function __construct($instance, $direct = false, $full = true, $onlyCode = false)
Severity: Minor
Found in src/Application/Backup.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 302.
Open

    public function createManifest($data, $backupDir = null)
    {
        $backupDir = $backupDir ?: $this->backupDir;
        $manifestFile = $backupDir . DIRECTORY_SEPARATOR . 'manifest.txt';
        $file = fopen($manifestFile, 'w');
Severity: Minor
Found in src/Application/Backup.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

The method backup has a boolean flag argument $onlyCode, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function backup($direct = false, $full = true, $onlyCode = false)
Severity: Minor
Found in src/Application/Instance.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

Severity
Category
Status
Source
Language