TikiWiki/tiki-manager

View on GitHub

Showing 332 of 2,142 total issues

Function createMultiple has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static function createMultiple($number, $length = 10, $type = 'pronounceable', $chars = '')
    {
        $passwords = [];

        while ($number > 0) {
Severity: Minor
Found in src/Ext/Password.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function getInstances has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getInstances($exclude_blank = false)
    {
        $result = query(self::SQL_SELECT_INSTANCE);

        $instances = [];
Severity: Minor
Found in src/Application/Instance.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function createTempPartial has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private function createTempPartial($root, $files)
    {
        $fileSystem = new Filesystem();
        $temp = implode(
            \DIRECTORY_SEPARATOR,
Severity: Minor
Found in src/Application/Backup.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function getApplications has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getApplications(Instance $instance)
    {
        $objects = [];

        $dir = __DIR__;
Severity: Minor
Found in src/Application/Application.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function extractTo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function extractTo(Version $version, $folder): void
    {
        $dirExists = file_exists($folder);

        if ($dirExists && preg_match('/tags\\//', $version->branch)) {
Severity: Minor
Found in src/Application/Tiki.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function decompressArchive has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function decompressArchive($folder, $archive)
    {
        $access = $this->access;

        $bzipStep = false;
Severity: Minor
Found in src/Application/Restore.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function install has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function install(Version $version, $checksumCheck = false)
    {
        $access = $this->instance->getBestAccess('scripting');
        $host = $access->getHost();

Severity: Minor
Found in src/Application/Tiki.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function createMultipleFromLogin has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static function createMultipleFromLogin($login, $type, $key = 0)
    {
        $passwords = [];
        $number    = count($login);
        $save      = $number;
Severity: Minor
Found in src/Ext/Password.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function query has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function query($query, $params = null)
{
    if (is_null($params)) {
        $params = [];
    }
Severity: Minor
Found in src/Libs/Helpers/functions.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Avoid too many return statements within this method.
Open

                    return $answer;
Severity: Major
Found in src/Command/CheckoutCommand.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                return $value;
    Severity: Major
    Found in src/Command/Traits/InstanceConfigure.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return 0;
      Severity: Major
      Found in src/Command/CloneInstanceCommand.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                    return $instance->getId() == $input->getOption('target');
        Severity: Major
        Found in src/Command/SetupCloneManagerCommand.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                      return 1;
          Severity: Major
          Found in src/Command/SetupCloneManagerCommand.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    return $instance;
            Severity: Major
            Found in src/Command/Traits/InstanceConfigure.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                              return implode(',', $emails);
              Severity: Major
              Found in src/Command/BackupInstanceCommand.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return $this->handleNotEmptyWebrootFolder($value);
                Severity: Major
                Found in src/Command/Traits/InstanceConfigure.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                              return $value;
                  Severity: Major
                  Found in src/Command/Traits/InstanceConfigure.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                return $value;
                    Severity: Major
                    Found in src/Command/Traits/InstanceConfigure.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                  return 1;
                      Severity: Major
                      Found in src/Command/CloneInstanceCommand.php - About 30 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language