owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

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

                      Method getSharesFromItem has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function getSharesFromItem($target) {
                              $result = [];
                              $owner = Filesystem::getOwner($target);
                              Filesystem::initMountPoints($owner);
                              $info = Filesystem::getFileInfo($target);
                      Severity: Minor
                      Found in apps/files_sharing/lib/Helper.php - About 1 hr to fix

                        Method expireTrash has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function expireTrash(string $uid) {
                                $trashBinSize = Trashbin::getTrashbinSize($uid);
                                $availableSpace = $this->quota->calculateFreeSpace($trashBinSize, $uid);
                        
                                // delete all files older then $retention_obligation
                        Severity: Minor
                        Found in apps/files_trashbin/lib/TrashExpiryManager.php - About 1 hr to fix

                          Method registerHooks has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function registerHooks() {
                                  $container = $this->getContainer();
                                  $hooksManager = new Hooks($container->query('TrustedServers'));
                          
                                  Util::connectHook(
                          Severity: Minor
                          Found in apps/federation/lib/AppInfo/Application.php - About 1 hr to fix

                            Method convertToOcmFileNotification has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function convertToOcmFileNotification($remoteId, $token, $action, $data = []) {
                                    $notification = new FileNotification();
                                    $map = [
                                        'accept' => FileNotification::NOTIFICATION_TYPE_SHARE_ACCEPTED,
                                        'decline' => FileNotification::NOTIFICATION_TYPE_SHARE_DECLINED,
                            Severity: Minor
                            Found in apps/federatedfilesharing/lib/Ocm/NotificationManager.php - About 1 hr to fix

                              Method getSubscriptionsForUser has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getSubscriptionsForUser($principalUri) {
                                      $fields = \array_values($this->subscriptionPropertyMap);
                                      $fields[] = 'id';
                                      $fields[] = 'uri';
                                      $fields[] = 'source';
                              Severity: Minor
                              Found in apps/dav/lib/CalDAV/CalDavBackend.php - About 1 hr to fix

                                Method createAddressbookChangesTable has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private function createAddressbookChangesTable(Schema $schema) {
                                        if (!$schema->hasTable("{$this->prefix}addressbookchanges")) {
                                            $table = $schema->createTable("{$this->prefix}addressbookchanges");
                                            $table->addColumn('id', 'integer', [
                                                'autoincrement' => true,
                                Severity: Minor
                                Found in apps/dav/appinfo/Migrations/Version20170116150538.php - About 1 hr to fix

                                  Method createCalendarChangesTable has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private function createCalendarChangesTable(Schema $schema) {
                                          if (!$schema->hasTable("{$this->prefix}calendarchanges")) {
                                              $table = $schema->createTable("{$this->prefix}calendarchanges");
                                              $table->addColumn('id', 'integer', [
                                                  'autoincrement' => true,
                                  Severity: Minor
                                  Found in apps/dav/appinfo/Migrations/Version20170116150538.php - About 1 hr to fix

                                    Method stream_read has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function stream_read($count) {
                                            $node = null;
                                            $lastNode = null;
                                            do {
                                                if ($this->currentStream === null) {
                                    Severity: Minor
                                    Found in apps/dav/lib/Upload/AssemblyStream.php - About 1 hr to fix

                                      Method update has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function update(
                                              $id,
                                              $backendOptions,
                                              $testOnly = true
                                          ) {
                                      Severity: Minor
                                      Found in apps/files_external/lib/Controller/UserGlobalStoragesController.php - About 1 hr to fix

                                        Method updateProperties has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            protected function updateProperties($addressBookId, $cardUri, $vCardSerialized) {
                                                $cardId = $this->getCardId($addressBookId, $cardUri);
                                                $vCard = $this->readCard($vCardSerialized);
                                        
                                                $this->purgeProperties($addressBookId, $cardId);
                                        Severity: Minor
                                        Found in apps/dav/lib/CardDAV/CardDavBackend.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language