TikiWiki/tiki-manager

View on GitHub

Showing 2,255 of 2,255 total issues

Method createUnpronounceable has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private static function createUnpronounceable($length, $chars)
    {
        global $_Text_Password_NumberOfPossibleCharacters;

        $password = '';
Severity: Minor
Found in src/Ext/Password.php - About 1 hr to fix

    Method interact has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function interact(InputInterface $input, OutputInterface $output)
        {
            $helper = $this->getHelper('question');
            $email = $input->getOption('email');
            if (empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL)) {
    Severity: Minor
    Found in src/Command/WatchInstanceCommand.php - About 1 hr to fix

      Method interact has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function interact(InputInterface $input, OutputInterface $output)
          {
              if (empty($input->getOption('time'))) {
                  $answer = $this->io->ask('What time should it run at?', '00:00', function ($answer) {
                      return CommandHelper::validateTimeInput($answer);
      Severity: Minor
      Found in src/Command/SetupUpdateCommand.php - About 1 hr to fix

        Method interact has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            protected function interact(InputInterface $input, OutputInterface $output)
            {
                if (empty($input->getOption('instances'))) {
                    $instances = CommandHelper::getInstances('tiki');
                    $instancesInfo = CommandHelper::getInstancesInfo($instances);
        Severity: Minor
        Found in src/Command/ConsoleInstanceCommand.php - About 1 hr to fix

          Method execute has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function execute(InputInterface $input, OutputInterface $output)
              {
                  $output->writeln('<comment>WARNING!</comment>');
                  $output->writeln('<comment>You are about to delete all state, backup, cache, and log files!</comment>');
          
          
          Severity: Minor
          Found in src/Command/ResetManagerCommand.php - About 1 hr to fix

            Method remove has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function remove($helper, $input, $output)
                {
                    $report = new ReportManager;
                    $instances = $report->getReportInstances();
                    $instancesInfo = CommandHelper::getInstancesInfo($instances);
            Severity: Minor
            Found in src/Command/ReportManagerCommand.php - About 1 hr to fix

              Method execute has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  protected function execute(InputInterface $input, OutputInterface $output)
                  {
                      $instances = CommandHelper::getInstances('tiki');
                      $instancesInfo = CommandHelper::getInstancesInfo($instances);
              
              
              Severity: Minor
              Found in src/Command/ConsoleInstanceCommand.php - About 1 hr to fix

                Method install has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function install(Instance $instance): Instance
                    {
                        $checksumCheck = $this->input->getOption('check') ?? false;
                        $revision = $this->input->getOption('revision');
                        $discovery = $instance->getDiscovery();
                Severity: Minor
                Found in src/Command/Traits/InstanceConfigure.php - About 1 hr to fix

                  Method secure_trim_data has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function secure_trim_data($should_set = false)
                  {
                      $modes = ['---', '--x', '-w-', '-wx', 'r--', 'r-x', 'rw-', 'rwx'];
                      $stat = stat($_ENV['TRIM_DATA']);
                  
                  
                  Severity: Minor
                  Found in src/Libs/Helpers/functions.php - About 1 hr to fix

                    Method runCommand has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function runCommand($command, $options = [])
                        {
                            $handle = self::getExtHandle();
                            $cwd = !empty($options['cwd']) ? $options['cwd'] : $this->location;
                            $env = !empty($options['env']) ? $options['env'] : $this->env;
                    Severity: Minor
                    Found in src/Libs/Host/SSHSeclibAdapter.php - About 1 hr to fix

                      Function interact has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          protected function interact(InputInterface $input, OutputInterface $output)
                          {
                      
                              if (empty($input->getOption('instance'))) {
                                  if (empty($this->instancesInfo)) {
                      Severity: Minor
                      Found in src/Command/TagListCommand.php - About 1 hr 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 getUpgradeVersion has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private function getUpgradeVersion($instance)
                          {
                              $found_incompatibilities = false;
                              $instance->detectPHP();
                      
                      
                      Severity: Minor
                      Found in src/Command/SetupCloneManagerCommand.php - About 1 hr 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 setInstanceSetupError has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static function setInstanceSetupError($instanceId, \Exception $e = null, $action = 'install')
                          {
                              $errors = [];
                              $io = App::get('io');
                      
                      
                      Severity: Minor
                      Found in src/Command/Helper/CommandHelper.php - About 1 hr 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 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function extractTo(Version $version, $folder, $revision = null): void
                          {
                              $dirExists = file_exists($folder);
                      
                              if ($dirExists && preg_match('/tags\\//', $version->branch)) {
                      Severity: Minor
                      Found in src/Application/Tiki.php - About 1 hr 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 log has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function log($level, $message, array $context = []): void
                          {
                              if (!is_string($message) && !$message instanceof \Stringable) {
                                  throw new \InvalidArgumentException('Message must be a string or an instance of Stringable.');
                              }
                      Severity: Minor
                      Found in src/Logger/ConsoleLogger.php - About 1 hr 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 performActualUpdate has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function performActualUpdate(Version $version, $options = [])
                          {
                              $access = $this->instance->getBestAccess('scripting');
                              $vcsType = $this->vcs_instance->getIdentifier();
                              $can_svn = $access->hasExecutable('svn') && $vcsType == 'SVN';
                      Severity: Minor
                      Found in src/Application/Tiki.php - About 1 hr 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 promptUser has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function promptUser($prompt, $default = false, $values = [])
                      {
                          if (!$_ENV['INTERACTIVE']) {
                              return $default;
                          }
                      Severity: Minor
                      Found in src/Libs/Helpers/functions.php - About 1 hr 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 info has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function info($targetFolder, $raw = false)
                          {
                              $cmd = "info $targetFolder";
                              if (! $raw) {
                                  $cmd .= ' --xml';
                      Severity: Minor
                      Found in src/Libs/VersionControl/Svn.php - About 1 hr 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

                      Method execute has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          protected function execute(InputInterface $input, OutputInterface $output)
                          {
                              if (empty($this->instancesInfo)) {
                                  $this->io->info('No instances available');
                                  return Command::SUCCESS;
                      Severity: Minor
                      Found in src/Command/TagDeleteCommand.php - About 1 hr to fix

                        Method execute has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            protected function execute(InputInterface $input, OutputInterface $output)
                            {
                                $email = $input->getOption('email');
                        
                                if (empty($email) || ! filter_var($email, FILTER_VALIDATE_EMAIL)) {
                        Severity: Minor
                        Found in src/Command/SetupWatchManagerCommand.php - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language