TikiWiki/tiki-manager

View on GitHub

Showing 2,235 of 2,235 total issues

getContainer accesses the super-global variable $_ENV.
Open

    public static function getContainer()
    {
        /** @var ContainerBuilder $container */
        static $container;

Severity: Minor
Found in src/Config/App.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

loadEnvironmentVariablesContainingLogic accesses the super-global variable $_ENV.
Open

    private function loadEnvironmentVariablesContainingLogic()
    {
        $_ENV['TRIM_OS'] = strtoupper(substr(PHP_OS, 0, 3));

        if ($_ENV['TRIM_OS'] === 'WIN') {
Severity: Minor
Found in src/Config/Environment.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

setRequiredEnvironmentVariables accesses the super-global variable $_ENV.
Open

    private function setRequiredEnvironmentVariables()
    {
        $pharPath = Phar::running(false);

        $_ENV['IS_PHAR'] = $isPhar = isset($pharPath) && !empty($pharPath);
Severity: Minor
Found in src/Config/Environment.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

runSetup accesses the super-global variable $_ENV.
Open

    private function runSetup()
    {
        debug('Running Tiki Manager at ' . $_ENV['TRIM_ROOT']);

        $writableFolders = ['CACHE_FOLDER', 'TEMP_FOLDER', 'RSYNC_FOLDER', 'MOUNT_FOLDER', 'BACKUP_FOLDER', 'ARCHIVE_FOLDER', 'TRIM_LOGS', 'TRIM_DATA', 'TRIM_SRC_FOLDER'];
Severity: Minor
Found in src/Config/Environment.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

runSetup accesses the super-global variable $_ENV.
Open

    private function runSetup()
    {
        debug('Running Tiki Manager at ' . $_ENV['TRIM_ROOT']);

        $writableFolders = ['CACHE_FOLDER', 'TEMP_FOLDER', 'RSYNC_FOLDER', 'MOUNT_FOLDER', 'BACKUP_FOLDER', 'ARCHIVE_FOLDER', 'TRIM_LOGS', 'TRIM_DATA', 'TRIM_SRC_FOLDER'];
Severity: Minor
Found in src/Config/Environment.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

runSetup accesses the super-global variable $_ENV.
Open

    private function runSetup()
    {
        debug('Running Tiki Manager at ' . $_ENV['TRIM_ROOT']);

        $writableFolders = ['CACHE_FOLDER', 'TEMP_FOLDER', 'RSYNC_FOLDER', 'MOUNT_FOLDER', 'BACKUP_FOLDER', 'ARCHIVE_FOLDER', 'TRIM_LOGS', 'TRIM_DATA', 'TRIM_SRC_FOLDER'];
Severity: Minor
Found in src/Config/Environment.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

The method execute() has a Cyclomatic Complexity of 20. The configured cyclomatic complexity threshold is 10.
Open

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $helper = $this->getHelper('question');

        $instances = CommandHelper::getInstances('all', true);
Severity: Minor
Found in src/Command/VerifyInstanceCommand.php by phpmd

CyclomaticComplexity

Since: 0.1

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

Example

// Cyclomatic Complexity = 11
class Foo {
1   public function example() {
2       if ($a == $b) {
3           if ($a1 == $b1) {
                fiddle();
4           } elseif ($a2 == $b2) {
                fiddle();
            } else {
                fiddle();
            }
5       } elseif ($c == $d) {
6           while ($c == $d) {
                fiddle();
            }
7        } elseif ($e == $f) {
8           for ($n = 0; $n < $h; $n++) {
                fiddle();
            }
        } else {
            switch ($z) {
9               case 1:
                    fiddle();
                    break;
10              case 2:
                    fiddle();
                    break;
11              case 3:
                    fiddle();
                    break;
                default:
                    fiddle();
                    break;
            }
        }
    }
}

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

runSetup accesses the super-global variable $_ENV.
Open

    private function runSetup()
    {
        debug('Running Tiki Manager at ' . $_ENV['TRIM_ROOT']);

        $writableFolders = ['CACHE_FOLDER', 'TEMP_FOLDER', 'RSYNC_FOLDER', 'MOUNT_FOLDER', 'BACKUP_FOLDER', 'ARCHIVE_FOLDER', 'TRIM_LOGS', 'TRIM_DATA', 'TRIM_SRC_FOLDER'];
Severity: Minor
Found in src/Config/Environment.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

loadEnvironmentVariablesContainingLogic accesses the super-global variable $_ENV.
Open

    private function loadEnvironmentVariablesContainingLogic()
    {
        $_ENV['TRIM_OS'] = strtoupper(substr(PHP_OS, 0, 3));

        if ($_ENV['TRIM_OS'] === 'WIN') {
Severity: Minor
Found in src/Config/Environment.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

loadEnvironmentVariablesContainingLogic accesses the super-global variable $_ENV.
Open

    private function loadEnvironmentVariablesContainingLogic()
    {
        $_ENV['TRIM_OS'] = strtoupper(substr(PHP_OS, 0, 3));

        if ($_ENV['TRIM_OS'] === 'WIN') {
Severity: Minor
Found in src/Config/Environment.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

runSetup accesses the super-global variable $_ENV.
Open

    private function runSetup()
    {
        debug('Running Tiki Manager at ' . $_ENV['TRIM_ROOT']);

        $writableFolders = ['CACHE_FOLDER', 'TEMP_FOLDER', 'RSYNC_FOLDER', 'MOUNT_FOLDER', 'BACKUP_FOLDER', 'ARCHIVE_FOLDER', 'TRIM_LOGS', 'TRIM_DATA', 'TRIM_SRC_FOLDER'];
Severity: Minor
Found in src/Config/Environment.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

The method runSetup() has a Cyclomatic Complexity of 40. The configured cyclomatic complexity threshold is 10.
Open

    private function runSetup()
    {
        debug('Running Tiki Manager at ' . $_ENV['TRIM_ROOT']);

        $writableFolders = ['CACHE_FOLDER', 'TEMP_FOLDER', 'RSYNC_FOLDER', 'MOUNT_FOLDER', 'BACKUP_FOLDER', 'ARCHIVE_FOLDER', 'TRIM_LOGS', 'TRIM_DATA', 'TRIM_SRC_FOLDER'];
Severity: Minor
Found in src/Config/Environment.php by phpmd

CyclomaticComplexity

Since: 0.1

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

Example

// Cyclomatic Complexity = 11
class Foo {
1   public function example() {
2       if ($a == $b) {
3           if ($a1 == $b1) {
                fiddle();
4           } elseif ($a2 == $b2) {
                fiddle();
            } else {
                fiddle();
            }
5       } elseif ($c == $d) {
6           while ($c == $d) {
                fiddle();
            }
7        } elseif ($e == $f) {
8           for ($n = 0; $n < $h; $n++) {
                fiddle();
            }
        } else {
            switch ($z) {
9               case 1:
                    fiddle();
                    break;
10              case 2:
                    fiddle();
                    break;
11              case 3:
                    fiddle();
                    break;
                default:
                    fiddle();
                    break;
            }
        }
    }
}

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

runSetup accesses the super-global variable $_ENV.
Open

    private function runSetup()
    {
        debug('Running Tiki Manager at ' . $_ENV['TRIM_ROOT']);

        $writableFolders = ['CACHE_FOLDER', 'TEMP_FOLDER', 'RSYNC_FOLDER', 'MOUNT_FOLDER', 'BACKUP_FOLDER', 'ARCHIVE_FOLDER', 'TRIM_LOGS', 'TRIM_DATA', 'TRIM_SRC_FOLDER'];
Severity: Minor
Found in src/Config/Environment.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

runSetup accesses the super-global variable $_ENV.
Open

    private function runSetup()
    {
        debug('Running Tiki Manager at ' . $_ENV['TRIM_ROOT']);

        $writableFolders = ['CACHE_FOLDER', 'TEMP_FOLDER', 'RSYNC_FOLDER', 'MOUNT_FOLDER', 'BACKUP_FOLDER', 'ARCHIVE_FOLDER', 'TRIM_LOGS', 'TRIM_DATA', 'TRIM_SRC_FOLDER'];
Severity: Minor
Found in src/Config/Environment.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

loadEnvironmentVariablesContainingLogic accesses the super-global variable $_ENV.
Open

    private function loadEnvironmentVariablesContainingLogic()
    {
        $_ENV['TRIM_OS'] = strtoupper(substr(PHP_OS, 0, 3));

        if ($_ENV['TRIM_OS'] === 'WIN') {
Severity: Minor
Found in src/Config/Environment.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

setRequiredEnvironmentVariables accesses the super-global variable $_ENV.
Open

    private function setRequiredEnvironmentVariables()
    {
        $pharPath = Phar::running(false);

        $_ENV['IS_PHAR'] = $isPhar = isset($pharPath) && !empty($pharPath);
Severity: Minor
Found in src/Config/Environment.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

runSetup accesses the super-global variable $_ENV.
Open

    private function runSetup()
    {
        debug('Running Tiki Manager at ' . $_ENV['TRIM_ROOT']);

        $writableFolders = ['CACHE_FOLDER', 'TEMP_FOLDER', 'RSYNC_FOLDER', 'MOUNT_FOLDER', 'BACKUP_FOLDER', 'ARCHIVE_FOLDER', 'TRIM_LOGS', 'TRIM_DATA', 'TRIM_SRC_FOLDER'];
Severity: Minor
Found in src/Config/Environment.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

runSetup accesses the super-global variable $_ENV.
Open

    private function runSetup()
    {
        debug('Running Tiki Manager at ' . $_ENV['TRIM_ROOT']);

        $writableFolders = ['CACHE_FOLDER', 'TEMP_FOLDER', 'RSYNC_FOLDER', 'MOUNT_FOLDER', 'BACKUP_FOLDER', 'ARCHIVE_FOLDER', 'TRIM_LOGS', 'TRIM_DATA', 'TRIM_SRC_FOLDER'];
Severity: Minor
Found in src/Config/Environment.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

The method getUpgradeVersion() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
Open

    public function getUpgradeVersion(Instance $instance, bool $onlySupported, string $branch = null, Version $curVersion = null): ?Version
    {
        $curVersion = $curVersion ?: $instance->getLatestVersion();
        if ($instance->getApplication()) {
            $versions = $instance->getApplication()->getUpgradableVersions($curVersion, $onlySupported);

CyclomaticComplexity

Since: 0.1

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

Example

// Cyclomatic Complexity = 11
class Foo {
1   public function example() {
2       if ($a == $b) {
3           if ($a1 == $b1) {
                fiddle();
4           } elseif ($a2 == $b2) {
                fiddle();
            } else {
                fiddle();
            }
5       } elseif ($c == $d) {
6           while ($c == $d) {
                fiddle();
            }
7        } elseif ($e == $f) {
8           for ($n = 0; $n < $h; $n++) {
                fiddle();
            }
        } else {
            switch ($z) {
9               case 1:
                    fiddle();
                    break;
10              case 2:
                    fiddle();
                    break;
11              case 3:
                    fiddle();
                    break;
                default:
                    fiddle();
                    break;
            }
        }
    }
}

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

loadEnvironmentVariablesContainingLogic accesses the super-global variable $_ENV.
Open

    private function loadEnvironmentVariablesContainingLogic()
    {
        $_ENV['TRIM_OS'] = strtoupper(substr(PHP_OS, 0, 3));

        if ($_ENV['TRIM_OS'] === 'WIN') {
Severity: Minor
Found in src/Config/Environment.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Severity
Category
Status
Source
Language