owncloud/core

View on GitHub

Showing 4,504 of 4,504 total issues

Avoid too many return statements within this method.
Open

            return $c->query('ServerContainer')->getEncryptionManager()->isEnabled();
Severity: Major
Found in core/Application.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                return $c->query('ServerContainer')->getAvatarManager();
    Severity: Major
    Found in core/Application.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return new DataResponse([
                  'file_id' => (string)$newFile->getId()]);
      Severity: Major
      Found in core/Controller/AppRegistryController.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                        return new DataResponse(
                            ['data' => ['message' => $this->l->t('Invalid image')]],
                            Http::STATUS_OK,
                            $headers
                        );
        Severity: Major
        Found in core/Controller/AvatarController.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                      return new UserSyncController(
                          $c->query('AppName'),
                          $c->query('Request'),
                          $syncService,
                          $c->query('UserManager')
          Severity: Major
          Found in core/Application.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return new DataResponse(
                                ['data' => ['message' => $this->l->t('Image too large')]],
                                Http::STATUS_OK,
                                $headers
                            );
            Severity: Major
            Found in core/Controller/AvatarController.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return true;
              Severity: Major
              Found in core/Controller/LostController.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                            return new TwoFactorChallengeController(
                                $c->query('AppName'),
                                $c->query('Request'),
                                $c->query('TwoFactorAuthManager'),
                                $c->query('UserSession'),
                Severity: Major
                Found in core/Application.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                              return $c->query('ServerContainer')->getMailer();
                  Severity: Major
                  Found in core/Application.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                return Util::getDefaultEmailAddress('lostpassword-noreply');
                    Severity: Major
                    Found in core/Application.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                  return $c->query('ServerContainer')->getLogger();
                      Severity: Major
                      Found in core/Application.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                    return new TimeFactory();
                        Severity: Major
                        Found in core/Application.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                      return new DataResponse([
                                          "code" => "INVALID_PARAMETER",
                                          "message" => $e->getMessage()
                                      ], 400);
                          Severity: Major
                          Found in core/Controller/AppRegistryController.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                        return new DataResponse(['data' => ['message' => $this->l->t('An error occurred. Please contact your admin.')]], Http::STATUS_OK, $headers);
                            Severity: Major
                            Found in core/Controller/AvatarController.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                          return new DataResponse(['data' => ['message' => $this->l->t('An error occurred. Please contact your admin.')]], Http::STATUS_BAD_REQUEST);
                              Severity: Major
                              Found in core/Controller/AvatarController.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                            return $c->query('ServerContainer')->getURLGenerator();
                                Severity: Major
                                Found in core/Application.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                              return $c->query('ServerContainer')->getUserManager();
                                  Severity: Major
                                  Found in core/Application.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                        return new DataResponse(
                                                            ['data' => ['message' => $this->l->t('Unknown filetype')]],
                                                            Http::STATUS_OK,
                                                            $headers
                                                        );
                                    Severity: Major
                                    Found in core/Controller/AvatarController.php - About 30 mins to fix

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                          getUID: function(element) {
                                              return ($(element).closest('tr').data('uid') || '').toString();
                                          },
                                      Severity: Minor
                                      Found in settings/js/users/users.js and 2 other locations - About 30 mins to fix
                                      settings/js/users/users.js on lines 340..342
                                      settings/js/users/users.js on lines 343..345

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 45.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                      Open

                                              this.$el.on('click', 'td.remove>img', function() {
                                                  self.deleteStorageConfig($(this).closest('tr'));
                                              });
                                      Severity: Minor
                                      Found in apps/files_external/js/settings.js and 2 other locations - About 30 mins to fix
                                      apps/files_external/js/settings.js on lines 744..746
                                      apps/files_external/js/settings.js on lines 752..754

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 45.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language