owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Storage has 21 functions (exceeds 20 allowed). Consider refactoring.
Open

class Storage implements IStorage {
    // hidden file which indicate that the folder is a valid key storage
    public const KEY_STORAGE_MARKER = '.oc_key_storage';

    /** @var View */
Severity: Minor
Found in lib/private/Encryption/Keys/Storage.php - About 2 hrs to fix

    OC_Defaults has 21 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class OC_Defaults {
        private $theme;
        private $l;
    
        private $defaultEntity;
    Severity: Minor
    Found in lib/private/legacy/defaults.php - About 2 hrs to fix

      Function move has 54 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              move: function(fileNames, targetPath) {
                  var self = this;
                  var dir = this.getCurrentDirectory();
                  if (dir.charAt(dir.length - 1) !== '/') {
                      dir += '/';
      Severity: Major
      Found in apps/files/js/filelist.js - About 2 hrs to fix

        Function _handleUpdateShareAttributes has 54 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                _handleUpdateShareAttributes: function(shareId, properties, options) {
                    var shareAttributesV1 = [];
                    var filteredAttributes = [];
                    var filteredRegisteredAttributes = this._filterRegisteredAttributes(properties.permissions);
                    _.map(filteredRegisteredAttributes, function(filteredRegisteredAttribute) {
        Severity: Major
        Found in core/js/shareitemmodel.js - About 2 hrs to fix

          Function resampleHermite has 54 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  var resampleHermite = function (canvas, W, H, W2, H2) {
                      W2 = Math.round(W2);
                      H2 = Math.round(H2);
                      var img = canvas.getContext("2d").getImageData(0, 0, W, H);
                      var img2 = canvas.getContext("2d").getImageData(0, 0, W2, H2);
          Severity: Major
          Found in core/js/oc-dialogs.js - About 2 hrs to fix

            Method formatUserForIndex has 54 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function formatUserForIndex(IUser $user, array $userGroups = null) {
                    // TODO: eliminate this encryption specific code below and somehow
                    // hook in additional user info from other apps
            
                    // recovery isn't possible if admin or user has it disabled and encryption
            Severity: Major
            Found in settings/Controller/UsersController.php - About 2 hrs to fix

              Method listApps has 54 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function listApps($category = '') {
                      if ($category === '') {
                          $category = 'enabled';
                      }
                      switch ($category) {
              Severity: Major
              Found in settings/Controller/AppSettingsController.php - About 2 hrs to fix

                Method run has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    protected function run($argument) {
                        $target = $argument['url'];
                        $source = $this->urlGenerator->getAbsoluteURL('/');
                        $source = \rtrim($source, '/');
                        $token = $argument['token'];
                Severity: Major
                Found in apps/federation/lib/BackgroundJob/GetSharedSecret.php - About 2 hrs to fix

                  Method auth has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function auth(RequestInterface $request, ResponseInterface $response) {
                          $forcedLogout = false;
                          if (!$this->request->passesCSRFCheck() &&
                              $this->requiresCSRFCheck()) {
                              // In case of a fail with POST we need to recheck the credentials
                  Severity: Major
                  Found in apps/dav/lib/Connector/Sabre/Auth.php - About 2 hrs to fix

                    Method checkAppsIntegrity has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function checkAppsIntegrity($data, $extractDir, $path, $isShipped = false) {
                            $l = \OC::$server->getL10N('lib');
                            //load the info.xml file of the app
                            if (!\is_file($extractDir.'/appinfo/info.xml')) {
                                //try to find it in a subdir
                    Severity: Major
                    Found in lib/private/Installer.php - About 2 hrs to fix

                      Method sendEmail has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function sendEmail($user, $token, $link) {
                              if ($this->userManager->userExists($user)) {
                                  $userObject = $this->userManager->get($user);
                                  $email = $userObject->getEMailAddress();
                      
                      
                      Severity: Major
                      Found in core/Controller/LostController.php - About 2 hrs to fix

                        Method wrap has 17 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                $source,
                                $internalPath,
                                $fullPath,
                                array $header,
                                $uid,
                        Severity: Major
                        Found in lib/private/Files/Stream/Encryption.php - About 2 hrs to fix

                          File et_EE.js has 255 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          OC.L10N.register(
                              "settings",
                              {
                              "Wrong current password" : "Vale praegune parool",
                              "No user supplied" : "Kasutajat ei sisestatud",
                          Severity: Minor
                          Found in settings/l10n/et_EE.js - About 2 hrs to fix

                            Function display has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    display: function (parent, triggerEvent, fileList) {
                                        if (!fileList) {
                                            console.warn('FileActions.display() MUST be called with a OCA.Files.FileList instance');
                                            return;
                                        }
                            Severity: Major
                            Found in apps/files/js/fileactions.js - About 2 hrs to fix

                              Function _extendFileList has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      _extendFileList: function(fileList) {
                                          // extend row prototype
                                          fileList.$el.addClass('has-favorites');
                                          var oldCreateRow = fileList._createRow;
                                          fileList._createRow = function(fileData) {
                              Severity: Major
                              Found in apps/files/js/tagsplugin.js - About 2 hrs to fix

                                Function render has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        render: function() {
                                            var self = this;
                                
                                            // render shares list in a container
                                            this.$el.html(this.template({
                                Severity: Major
                                Found in core/js/sharedialogshareelistview.js - About 2 hrs to fix

                                  Function addConflict has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          var addConflict = function($conflicts, original, replacement) {
                                  
                                              var $conflict = $conflicts.find('.template').clone().removeClass('template').addClass('conflict');
                                              var $originalDiv = $conflict.find('.original');
                                              var $replacementDiv = $conflict.find('.replacement');
                                  Severity: Major
                                  Found in core/js/oc-dialogs.js - About 2 hrs to fix

                                    Method getAssignableAndRemovableGroups has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function getAssignableAndRemovableGroups() {
                                            $assignableGroups = [];
                                            $removableGroups = [];
                                    
                                            $currentUser = $this->userSession->getUser();
                                    Severity: Major
                                    Found in settings/Controller/GroupsController.php - About 2 hrs to fix

                                      Method getTrashFiles has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public static function getTrashFiles($dir, $user, $sortAttribute = '', $sortDescending = false, $addExtraData = true) {
                                              $result = [];
                                              $timestamp = null;
                                      
                                              $view = new \OC\Files\View('/' . $user . '/files_trashbin/files');
                                      Severity: Major
                                      Found in apps/files_trashbin/lib/Helper.php - About 2 hrs to fix

                                        Method restore has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public static function restore($filename, $targetLocation = null) {
                                                $user = User::getUser();
                                                $view = new View('/' . $user);
                                                $nameOfFile = \basename($filename);
                                                $dirOfFile = \dirname($filename);
                                        Severity: Major
                                        Found in apps/files_trashbin/lib/Trashbin.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language