owncloud/core

View on GitHub

Showing 4,504 of 4,504 total issues

Method checkAppForUser has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function checkAppForUser($enabled, $appName, $user) {
        if ($user !== null) {
            $userAppAttributes = $user->getExtendedAttributes();
            /**
             * Guests will only have access to some whitelisted apps
Severity: Minor
Found in lib/private/App/AppManager.php - About 1 hr to fix

    Method needUpgrade has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function needUpgrade(\OCP\IConfig $config) {
            if ($config->getSystemValue('installed', false)) {
                $installedVersion = $config->getSystemValue('version', '0.0.0');
                $currentVersion = \implode('.', \OCP\Util::getVersion());
                $versionDiff = \version_compare($currentVersion, $installedVersion);
    Severity: Minor
    Found in lib/private/legacy/util.php - About 1 hr to fix

      Method l has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function l($type, $data = null, $options = []) {
              // Use the language of the instance
              $locale = $this->getLanguageCode();
              if ($locale === 'sr@latin') {
                  $locale = 'sr_latn';
      Severity: Minor
      Found in lib/private/L10N/L10N.php - About 1 hr to fix

        Method delete has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function delete($id) {
                return $this->emittingCall(function () use (&$id) {
                    if (!\is_string($id)) {
                        throw new \InvalidArgumentException('Parameter must be string');
                    }
        Severity: Minor
        Found in lib/private/Comments/Manager.php - About 1 hr to fix

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

              protected function execute(InputInterface $input, OutputInterface $output): int {
                  if (Filesystem::isPrimaryObjectStorageEnabled() === true) {
                      $output->writeln('<info>We detected that the instance is running on a S3 primary object storage, user directories count might not be accurate</info>');
                  }
          
          
          Severity: Minor
          Found in core/Command/User/Report.php - About 1 hr to fix

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

                protected function execute(InputInterface $input, OutputInterface $output): int {
                    if ($this->encryptionManager->isEnabled() === false) {
                        throw new \Exception('Server side encryption is not enabled');
                    }
                    $yes = $input->getOption('yes');
            Severity: Minor
            Found in core/Command/Encryption/EncryptAll.php - About 1 hr to fix

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

                  protected function execute(InputInterface $input, OutputInterface $output): int {
                      $user = $this->getUser($input);
                      $userId = $user->getUID();
                      $oldHome = $user->getHome();
              
              
              Severity: Minor
              Found in core/Command/User/MoveHome.php - About 1 hr to fix

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

                    protected function execute(InputInterface $input, OutputInterface $output): int {
                        $path = $input->getOption('path');
                        $privateKeyPath = $input->getOption('privateKey');
                        $keyBundlePath = $input->getOption('certificate');
                        if ($path === null || $privateKeyPath === null || $keyBundlePath === null) {
                Severity: Minor
                Found in core/Command/Integrity/SignApp.php - About 1 hr to fix

                  Method getAvatar has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getAvatar($userId, $size) {
                          if ($size > 2048) {
                              $size = 2048;
                          } elseif ($size <= 0) {
                              $size = 64;
                  Severity: Minor
                  Found in core/Controller/AvatarController.php - About 1 hr to fix

                    Function writeParameterInput has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        writeParameterInput: function($td, parameter, placeholder, classes) {
                            var hasFlag = function(flag) {
                                return (placeholder.flags & flag) === flag;
                            };
                            classes = $.isArray(classes) ? classes : [];
                    Severity: Minor
                    Found in apps/files_external/js/settings.js - About 1 hr to fix

                      Function verifyCode has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      OCA.External.Settings.OAuth2.verifyCode = function (backendUrl, data) {
                          var $tr = data['tr'];
                          var configured = $tr.find('[data-parameter="configured"]');
                          var token = $tr.find('.configuration [data-parameter="token"]');
                          var statusSpan = $tr.find('.status span');
                      Severity: Minor
                      Found in apps/files_external/js/settings.js - About 1 hr to fix

                        Function success has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                success: function (data) {
                                    if (typeof data === 'string') {
                                        data = JSON.parse(data);
                                    } else if (data && data.length) {
                                        // fetch response from iframe
                        Severity: Minor
                        Found in settings/js/certificates.js - About 1 hr to fix

                          Function initSelection has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  initSelection: function(element, callback) {
                                      var storageConfig = element.closest('tr').data('storageConfig');
                                      $.when(
                                          $.ajax(OC.generateUrl('apps/files_external/applicable/users'), {
                                              type: 'POST',
                          Severity: Minor
                          Found in apps/files_external/js/settings.js - About 1 hr to fix

                            Function remove has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    remove: function(name, options){
                                        options = options || {};
                                        var fileEl = this.findFileEl(name);
                                        var fileId = fileEl.data('id');
                                        var index = fileEl.index();
                            Severity: Minor
                            Found in apps/files/js/filelist.js - About 1 hr to fix

                              Function _setCurrentDir has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      _setCurrentDir: function(targetDir, changeUrl, fileId) {
                                          targetDir = targetDir.replace(/\\/g, '/');
                                          if (!this._isValidPath(targetDir)) {
                                              OC.Notification.show(t('files', 'Invalid path'), {type: 'error'});
                                              targetDir = '/';
                              Severity: Minor
                              Found in apps/files/js/filelist.js - About 1 hr to fix

                                Function updateShare has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        updateShare: function(shareId, properties, options) {
                                            var self = this;
                                
                                            // Extend attributes for update share if provided for update.
                                            // note: required only for compatibility with attributes v1
                                Severity: Minor
                                Found in core/js/shareitemmodel.js - About 1 hr to fix

                                  Function getDirShareInfo has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          getDirShareInfo: function(dir) {
                                              // Dir can't be empty
                                              if (typeof dir !== 'string' || dir.length === 0) {
                                                  return Promise.reject('getDirShareInfo(). param must be typeof string and can not be empty!');
                                              }
                                  Severity: Minor
                                  Found in apps/files/js/filelist.js - About 1 hr to fix

                                    Function getFolderContents has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            getFolderContents: function(path, options) {
                                                if (!path) {
                                                    path = '';
                                                }
                                                options = options || {};
                                    Severity: Minor
                                    Found in core/js/files/client.js - About 1 hr to fix

                                      Function loadIcons has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          loadIcons:function(itemType, fileList, callback) {
                                              var path = fileList.dirInfo.path;
                                              if (path === '/') {
                                                  path = '';
                                              }
                                      Severity: Minor
                                      Found in core/js/share.js - About 1 hr to fix

                                        Function _sendEmailPrivateLink has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                _sendEmailPrivateLink: function(mail) {
                                                    var deferred           = $.Deferred();
                                                    var $formSentIndicator = this.$el.find('.emailPrivateLinkForm--sent-indicator');
                                                    if(mail.toSelf === true) {
                                                        this._addAddress(OC.getCurrentUser().email);
                                        Severity: Minor
                                        Found in core/js/sharedialogmailview.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language