TikiWiki/tiki-manager

View on GitHub

Showing 2,245 of 2,245 total issues

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

            throw new \Exception(sprintf('Unable to download patch contents from %s', $patch->url));
Severity: Minor
Found in src/Application/Tiki.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 '1053', column '23').
Open

            throw new \Exception("Composer install failed for {$bundled}composer.lock (Tiki bundled packages).\nCheck " . $_ENV['TRIM_OUTPUT'] . " for more details.");
Severity: Minor
Found in src/Application/Tiki.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 '144', column '23').
Open

            throw new \RuntimeException(sprintf('Instance %s not found.', $instanceId));
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

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

function promptPassword($prompt = "Password", $stars = true, $allowEmpty = false)
Severity: Minor
Found in src/Libs/Helpers/functions.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 installTikiPackages has a boolean flag argument $update, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function installTikiPackages(bool $update = 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 '161', column '23').
Open

            throw new \RuntimeException('Folder 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

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 $instance, bool $direct = false, bool $onlyData = false, bool $skipSystemConfigurationCheck = false, $allowCommonParents = 0)
Severity: Minor
Found in src/Application/Restore.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 getBranch has a boolean flag argument $refresh, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getBranch($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 '508', column '19').
Open

        throw new Exception('There was a problem when installing Composer.');
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

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

            throw new \Exception(sprintf('Patch utility is required to apply local patches.'));
Severity: Minor
Found in src/Application/Tiki.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 '95', column '23').
Open

            throw new \RuntimeException('Profile name cannot be empty.');
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 '111', column '35').
Open

                        throw new \RuntimeException('Git URL 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

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

function promptPassword($prompt = "Password", $stars = true, $allowEmpty = false)
Severity: Minor
Found in src/Libs/Helpers/functions.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 413.
Open

function php()
{

    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
        $paths = `where php`;
Severity: Minor
Found in src/Libs/Helpers/functions.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

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

function php()
{

    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
        $paths = `where php`;
Severity: Minor
Found in src/Libs/Helpers/functions.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 '245', column '31').
Open

                    throw new \Exception('Command failed');
Severity: Minor
Found in src/Application/Tiki.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 '603', column '23').
Open

            throw new \Exception('Access to this instance does not support execution of shell commands.');
Severity: Minor
Found in src/Application/Tiki.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 '88', 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 '152', column '23').
Open

            throw new \RuntimeException('Unable to initialize Tiki application. Please check if selected instance is a Tiki instance.');
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

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

function secure_trim_data($should_set = false)
Severity: Minor
Found in src/Libs/Helpers/functions.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