owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Function davSync has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function davSync(method, model, options) {
        var params = {type: getTypeForMethod(method, model)};
        var isCollection = (model instanceof Backbone.Collection);

        // Ensure that we have a URL.
Severity: Minor
Found in core/js/oc-backbone-webdav.js - About 1 hr to fix

    Method setDisplayName has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function setDisplayName($username, $displayName) {
            $resp = $this->validateString($displayName, 64);
            if ($resp) {
                return $resp;
            }
    Severity: Minor
    Found in settings/Controller/UsersController.php - About 1 hr to fix

      Method getFailedIntegrityCheckFiles has 43 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getFailedIntegrityCheckFiles(): DataDisplayResponse {
              if (!$this->checker->isCodeCheckEnforced()) {
                  return new DataDisplayResponse('Integrity checker has been disabled. Integrity cannot be verified.');
              }
      
      
      Severity: Minor
      Found in settings/Controller/CheckSetupController.php - About 1 hr to fix

        Method resendToken has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function resendToken($userId) {
                $user = $this->userManager->get($userId);
        
                if ($user === null) {
                    $this->log->error('User: ' . $userId . ' does not exist', ['app' => 'settings']);
        Severity: Minor
        Found in settings/Controller/UsersController.php - About 1 hr to fix

          Method httpPost has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function httpPost(RequestInterface $request, ResponseInterface $response) {
                  $path = $request->getPath();
          
                  // Only handling xml
                  $contentType = $request->getHeader('Content-Type');
          Severity: Minor
          Found in apps/dav/lib/CalDAV/Publishing/PublishPlugin.php - About 1 hr to fix

            Method getACL has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getACL() {
                    $acl =  [
                        [
                            'privilege' => '{DAV:}read',
                            'principal' => $this->getOwner(),
            Severity: Minor
            Found in apps/dav/lib/CalDAV/Calendar.php - About 1 hr to fix

              Method createTag has 43 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function createTag($tagName, $userVisible, $userAssignable, $userEditable = null) {
                      $userVisible = (int)$userVisible;
                      $userAssignable = (int)$userAssignable;
              
                      /**
              Severity: Minor
              Found in lib/private/SystemTag/SystemTagManager.php - About 1 hr to fix

                Method initMountPoints has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function initMountPoints($user = '', $fullInit = true) {
                        if ($user == '') {
                            $user = \OC_User::getUser();
                        }
                        if ($user === null || $user === false || $user === '') {
                Severity: Minor
                Found in lib/private/Files/Filesystem.php - About 1 hr to fix

                  Method queryPreviewsToDelete has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function queryPreviewsToDelete(int $startFileId = 0, int $chunkSize = 1000): array {
                          $dbPlatform = $this->connection->getDatabasePlatform();
                          $isOracle = ($dbPlatform instanceof OraclePlatform);
                          $isOldMysql = ($dbPlatform instanceof MySqlPlatform && !($dbPlatform instanceof MySQL80Platform || $dbPlatform instanceof MariaDb1027Platform));
                  
                  
                  Severity: Minor
                  Found in lib/private/PreviewCleanup.php - About 1 hr to fix

                    Method getSystemInfo has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getSystemInfo($allowAllDatabases = false) {
                            $databases = $this->getSupportedDatabases($allowAllDatabases);
                    
                            $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data');
                    
                    
                    Severity: Minor
                    Found in lib/private/Setup.php - About 1 hr to fix

                      Function launchFullConnectivityCheckOneByOne has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          launchFullConnectivityCheckOneByOne: function () {
                              var self = this;
                              this.getMountPointList(function (list) {
                                  // check if we have a list first
                                  if (list === undefined && !self.emptyWarningShown) {
                      Severity: Minor
                      Found in apps/files_external/js/statusmanager.js - About 1 hr to fix

                        Function _onChangeServerClicked has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            _onChangeServerClicked: function (event) {
                                event.preventDefault();
                                this.$saveToOcServerMenu.css('display', 'none');
                        
                                OC.dialogs.prompt('', t('files_sharing', 'Add to another cloud'),
                        Severity: Minor
                        Found in apps/files_sharing/js/public.js - About 1 hr to fix

                          Function _renderInlineAction has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  _renderInlineAction: function(actionSpec, isDefault, context) {
                                      var renderFunc = actionSpec.render || _.bind(this._defaultRenderAction, this);
                                      var $actionEl = renderFunc(actionSpec, isDefault, context);
                                      if (!$actionEl || !$actionEl.length) {
                                          return;
                          Severity: Minor
                          Found in apps/files/js/fileactions.js - About 1 hr to fix

                            Function createDirectory has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    createDirectory: function(name) {
                                        var self = this;
                                        var deferred = $.Deferred();
                                        var promise = deferred.promise();
                            
                            
                            Severity: Minor
                            Found in apps/files/js/filelist.js - About 1 hr to fix

                              Function toHsl has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  String.prototype.toHsl = function() {
                              
                                      var hash = this.toLowerCase().replace(/[^0-9a-f]+/g, '');
                              
                                      // Already a md5 hash?
                              Severity: Minor
                              Found in core/js/placeholder.js - About 1 hr to fix

                                Method search has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function search($search = '', $itemType = null, $page = 1, $perPage = 200) {
                                        if ($perPage <= 0) {
                                            return [ 'statuscode' => Http::STATUS_BAD_REQUEST,
                                                'message' => 'Invalid perPage argument'];
                                        }
                                Severity: Minor
                                Found in apps/files_sharing/lib/Controller/ShareesController.php - About 1 hr to fix

                                  Method format has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private function format(INotification $notification, L10N $l) {
                                          $params = $notification->getSubjectParameters();
                                          if ($params[0] !== $params[1] && $params[1] !== null) {
                                              $params[0] = $this->getUserString($params[0]);
                                              $params[1] = $this->getUserString($params[1]);
                                  Severity: Minor
                                  Found in apps/files_sharing/lib/Notifier.php - About 1 hr to fix

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

                                        protected function updateProperties($path, INode $node, $changedProperties) {
                                            $existingProperties = $this->getProperties($path, $node, []);
                                    
                                            // TODO: use "insert or update" strategy ?
                                            $this->connection->beginTransaction();
                                    Severity: Minor
                                    Found in apps/dav/lib/DAV/MiscCustomPropertiesBackend.php - About 1 hr to fix

                                      Method handleGetProperties has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function handleGetProperties(
                                              PropFind $propFind,
                                              \Sabre\DAV\INode $node
                                          ) {
                                              if (!($node instanceof File) && !($node instanceof Directory)) {
                                      Severity: Minor
                                      Found in apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php - About 1 hr to fix

                                        Method getAllInvalidShareStorages has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            protected function getAllInvalidShareStorages($storageType, $scopeUid) {
                                                $query = $this->connection->getQueryBuilder();
                                        
                                                if ($this->connection->getDatabasePlatform() instanceof MySqlPlatform) {
                                                    $concatFunction = $query->createFunction("CONCAT('$storageType', s.uid_owner)");
                                        Severity: Minor
                                        Found in apps/files/lib/Command/TroubleshootTransferOwnership.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language