TikiWiki/tiki-manager

View on GitHub

Showing 2,235 of 2,235 total issues

Avoid using static access to class '\TikiManager\Libs\Audit\Checksum' in method 'hasChecksums'.
Open

        return Checksum::hasChecksums($this->id);
Severity: Minor
Found in src/Application/Version.php by phpmd

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

Avoid using static access to class '\TikiManager\Libs\Audit\Checksum' in method 'performCheck'.
Open

        return Checksum::validate($this->id, $result);
Severity: Minor
Found in src/Application/Version.php by phpmd

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

Avoid using static access to class '\TikiManager\Libs\Audit\Checksum' in method 'collectChecksumFromInstance'.
Open

            : (Checksum::checksumRemoteFolder($folder, $access));
Severity: Minor
Found in src/Application/Version.php by phpmd

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

Avoid using static access to class '\TikiManager\Libs\Audit\Checksum' in method 'collectChecksumFromInstance'.
Open

        return Checksum::saveChecksums($this->id, $result);
Severity: Minor
Found in src/Application/Version.php by phpmd

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

Avoid using static access to class '\TikiManager\Libs\Audit\Checksum' in method 'getFileMap'.
Open

        return Checksum::getChecksums($this->id);
Severity: Minor
Found in src/Application/Version.php by phpmd

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

Avoid using static access to class '\TikiManager\Command\Helper\CommandHelper' in method 'execute'.
Open

        $instances = CommandHelper::getInstances();
Severity: Minor
Found in src/Command/AccessInstanceCommand.php by phpmd

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

Avoid using static access to class '\TikiManager\Command\Helper\CommandHelper' in method 'execute'.
Open

                $question = CommandHelper::getQuestion('Which instance(s) do you want to access', null, '?');
Severity: Minor
Found in src/Command/AccessInstanceCommand.php by phpmd

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

Avoid using static access to class '\TikiManager\Command\Helper\CommandHelper' in method 'execute'.
Open

        $instancesInfo = CommandHelper::getInstancesInfo($instances);
Severity: Minor
Found in src/Command/ApplyPatchCommand.php by phpmd

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

Avoid using static access to class '\TikiManager\Command\Helper\CommandHelper' in method 'interact'.
Open

        $instancesInfo = CommandHelper::getInstancesInfo($instances);
Severity: Minor
Found in src/Command/ApplyProfileCommand.php by phpmd

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

Avoid using static access to class '\TikiManager\Command\Helper\CommandHelper' in method 'interact'.
Open

                    $excludeInstance = implode(',', CommandHelper::getInstanceIds($selectedInstances));
Severity: Minor
Found in src/Command/BackupInstanceCommand.php by phpmd

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

The method execute() has 109 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $maxBackups = $input->getOption('max-backups') ?: Environment::get('DEFAULT_MAX_BACKUPS', 0);
        if (isset($maxBackups) && filter_var($maxBackups, FILTER_VALIDATE_INT) === false) {
            $this->io->error('Max number of backups to keep by instance is not a number');
Severity: Minor
Found in src/Command/BackupInstanceCommand.php by phpmd

The method interact() has an NPath complexity of 540. The configured NPath complexity threshold is 200.
Open

    protected function interact(InputInterface $input, OutputInterface $output)
    {
        $instances = CommandHelper::getInstances('tiki');
        $instances = array_filter($instances, function ($instance) {
            return $instance->vcs_type == 'git';
Severity: Minor
Found in src/Command/CheckoutCommand.php by phpmd

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

Avoid using static access to class '\TikiManager\Command\Helper\CommandHelper' in method 'interact'.
Open

        $instances = CommandHelper::getInstances('tiki');
Severity: Minor
Found in src/Command/CheckoutCommand.php by phpmd

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

The method execute() has an NPath complexity of 1152. The configured NPath complexity threshold is 200.
Open

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $instanceId = $input->getOption('instance');
        $instance = Instance::getInstance($instanceId);

Severity: Minor
Found in src/Command/CheckoutCommand.php by phpmd

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

Avoid using static access to class '\TikiManager\Command\Helper\CommandHelper' in method 'execute'.
Open

        $question = CommandHelper::getQuestion('Do you want to clear logs folder? [y,n]');
Severity: Minor
Found in src/Command/ClearLogsCommand.php by phpmd

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

Avoid using static access to class '\TikiManager\Application\Instance' in method 'execute'.
Open

            $cloneInstance = Instance::getInstanceByName($blankInstanceName);

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

Avoid using static access to class '\TikiManager\Command\Helper\CommandHelper' in method 'execute'.
Open

            CommandHelper::renderInstancesTable($output, $instancesInfo);
Severity: Minor
Found in src/Command/CloneInstanceCommand.php by phpmd

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

Avoid using static access to class '\TikiManager\Command\Helper\CommandHelper' in method 'interact'.
Open

            $instancesInfo = CommandHelper::getInstancesInfo($instances);

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

Avoid using static access to class '\TikiManager\Command\Helper\CommandHelper' in method 'execute'.
Open

            $question = CommandHelper::getQuestion('Which instance(s) do you want to copy the SSH key', null, '?');
Severity: Minor
Found in src/Command/CopySshKeyCommand.php by phpmd

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

Avoid using static access to class '\TikiManager\Command\Helper\CommandHelper' in method 'interact'.
Open

        $instances = CommandHelper::getInstances('update');
Severity: Minor
Found in src/Command/ApplyProfileCommand.php by phpmd

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

Severity
Category
Status
Source
Language