TikiWiki/tiki-manager

View on GitHub

Showing 332 of 2,142 total issues

Avoid too many return statements within this method.
Open

                return CommandHelper::validateInstanceSelection($answer, $instances);
Severity: Major
Found in src/Command/SetupCloneManagerCommand.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                    return Password::asciiRotxpp($login, $key);
    Severity: Major
    Found in src/Ext/Password.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return $this->branch = $branch;
      Severity: Major
      Found in src/Application/Tiki.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return $supported[0];
        Severity: Major
        Found in src/Application/Tiki/Versions/TikiRequirementsHelper.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  return $files;
          Severity: Major
          Found in src/Application/Tiki.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return $this->branch = $entry;
            Severity: Major
            Found in src/Application/Tiki.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                              return Password::asciiRotxmm($login, $key);
              Severity: Major
              Found in src/Ext/Password.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                        return '';
                Severity: Major
                Found in src/Ext/Password.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                  return Password::rotx($login, $key);
                  Severity: Major
                  Found in src/Ext/Password.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                    return Password::rotxmm($login, $key);
                    Severity: Major
                    Found in src/Ext/Password.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                      return Password::rotxpp($login, $key);
                      Severity: Major
                      Found in src/Ext/Password.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                    return true;
                        Severity: Major
                        Found in src/Application/Tiki.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                          return Password::asciiRotx($login, $key);
                          Severity: Major
                          Found in src/Ext/Password.php - About 30 mins to fix

                            Function execute has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                protected function execute(InputInterface $input, OutputInterface $output)
                                {
                                    $instances = CommandHelper::getInstances('upgrade');
                                    $instancesInfo = CommandHelper::getInstancesInfo($instances);
                                    $tiki_namespace = true;
                            Severity: Minor
                            Found in src/Command/CloneAndRedactInstanceCommand.php - About 25 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 execute has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                protected function execute(InputInterface $input, OutputInterface $output)
                                {
                                    $command_name = 'manager:instance:clone';
                                    if (!$this->getApplication()->has($command_name)) {
                                        $command_name = 'instance:clone';
                            Severity: Minor
                            Found in src/Command/CloneAndUpgradeInstanceCommand.php - About 25 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 getInstancesInfo has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public static function getInstancesInfo(array $instances, bool $all_infos = false): ?array
                                {
                                    $instancesInfo = null;
                            
                                    foreach ($instances as $instance) {
                            Severity: Minor
                            Found in src/Command/Helper/CommandHelper.php - About 25 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 interact has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                protected function interact(InputInterface $input, OutputInterface $output)
                                {
                                    $instances = CommandHelper::getInstances('all', true);
                                    $instancesInfo = CommandHelper::getInstancesInfo($instances);
                            
                            
                            Severity: Minor
                            Found in src/Command/SetupSchedulerCronInstanceCommand.php - About 25 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 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public static function getInstances($type = 'all', $excludeBlank = false)
                                {
                                    $result = [];
                            
                                    switch ($type) {
                            Severity: Minor
                            Found in src/Command/Helper/CommandHelper.php - About 25 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 removeFiles has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public static function removeFiles($files, LoggerInterface $logger)
                                {
                                    if (!is_array($files)) {
                                        $files = [$files];
                                    }
                            Severity: Minor
                            Found in src/Command/Helper/CommandHelper.php - About 25 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 setArchiveSymlink has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function setArchiveSymlink($symlinkPath = null, $archiveDir = null, $instance = null)
                                {
                                    if (file_exists($symlinkPath)) { // if destination path exists, skip
                                        return true;
                                    }
                            Severity: Minor
                            Found in src/Application/Backup.php - About 25 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

                            Severity
                            Category
                            Status
                            Source
                            Language