TikiWiki/tiki-manager

View on GitHub

Showing 2,245 of 2,245 total issues

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

    protected function restoreFilesFromFolder(string $srcFolder)
    {
        $manifest = "{$srcFolder}/manifest.txt";
        $folders = $this->readManifest($manifest);

Severity: Minor
Found in src/Application/Restore.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 '102', column '35').
Open

                        throw new \RuntimeException('Folder cannot be empty');
Severity: Minor
Found in src/Command/CheckoutCommand.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 '123', column '31').
Open

                    throw new \RuntimeException('Branch name cannot be empty');
Severity: Minor
Found in src/Command/CheckoutCommand.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 '165', column '23').
Open

            throw new \RuntimeException('Branch name cannot be empty.');
Severity: Minor
Found in src/Command/CheckoutCommand.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 '493', column '19').
Open

        throw new Exception($message);
Severity: Minor
Found in src/Libs/Helpers/functions.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 getCompatibleVersions has a boolean flag argument $withBlank, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getCompatibleVersions(bool $withBlank = true)
Severity: Minor
Found in src/Application/Tiki.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 '90', column '31').
Open

                    throw new \RuntimeException('Package name cannot be empty');
Severity: Minor
Found in src/Command/ApplyPatchCommand.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 '100', column '31').
Open

                    throw new \RuntimeException('Patch URL cannot be empty');
Severity: Minor
Found in src/Command/ApplyPatchCommand.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 '124', column '23').
Open

            throw new \RuntimeException('No Tiki instances available to apply a patch-.');
Severity: Minor
Found in src/Command/ApplyPatchCommand.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 '91', column '23').
Open

            throw new \RuntimeException('No Tiki instances available to apply a profile.');
Severity: Minor
Found in src/Command/ApplyProfileCommand.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 '150', column '23').
Open

            throw new \RuntimeException('No instances defined for backup');
Severity: Minor
Found in src/Command/BackupInstanceCommand.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 '54', column '38').
Open

                $requirements = (new \TikiManager\Application\Tiki\Versions\Fetcher\YamlFetcher)->getParsedRequirements();
Severity: Minor
Found in src/Command/Helper/CommandHelper.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 '335', column '23').
Open

            throw new \RuntimeException(
Severity: Minor
Found in src/Command/Helper/CommandHelper.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 '70', column '27').
Open

                throw new \RuntimeException('No instance available.');
Severity: Minor
Found in src/Command/CheckoutCommand.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 '27').
Open

                throw new \RuntimeException('Selected Tiki instance is not a Git checkout.');
Severity: Minor
Found in src/Command/CheckoutCommand.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 '317', column '27').
Open

                throw new \RuntimeException(
Severity: Minor
Found in src/Command/Helper/CommandHelper.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 '399', column '23').
Open

            throw new \RuntimeException(
Severity: Minor
Found in src/Command/Helper/CommandHelper.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 '488', column '23').
Open

            throw new \Exception('Failed to copy file to ' . $setupFile);
Severity: Minor
Found in src/Libs/Helpers/functions.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 getInstallType has a boolean flag argument $refresh, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getInstallType($refresh = false)
Severity: Minor
Found in src/Application/Tiki.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 '132', column '23').
Open

            throw new \RuntimeException('Patch URL cannot be empty.');
Severity: Minor
Found in src/Command/ApplyPatchCommand.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