owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

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

    public static function renameOrCopy($sourcePath, $targetPath, $operation) {
        list($sourceOwner, $sourcePath) = self::getSourcePathAndUser($sourcePath);

        // it was a upload of a existing file if no old path exists
        // in this case the pre-hook already called the store method and we can
Severity: Minor
Found in apps/files_versions/lib/Storage.php - About 1 hr to fix

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

        protected function analyse(OutputInterface $output) {
            $view = new View();
            $output->writeln("Analysing files of $this->sourceUser ...");
            $progress = new ProgressBar($output);
            $progress->start();
    Severity: Minor
    Found in apps/files/lib/Command/TransferOwnership.php - About 1 hr to fix

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

          protected function propfind($path, $strictNotFoundCheck=false) {
              $path = $this->cleanPath($path);
              $cachedResponse = $this->statCache->get($path);
              // we either don't know it, or we know it exists but need more details
              if ($cachedResponse === null || $cachedResponse === true) {
      Severity: Minor
      Found in lib/private/Files/Storage/DAV.php - About 1 hr to fix

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

            private function moveAvatars(IOutput $out, IUser $user) {
                $userId = $user->getUID();
        
                try {
                    \OC\Files\Filesystem::initMountPoints($userId);
        Severity: Minor
        Found in lib/private/Repair/MoveAvatarIntoSubFolder.php - About 1 hr to fix

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

              public function wrapStorage($mountPoint, Storage $storage, IMountPoint $mount) {
                  $parameters = [
                      'storage' => $storage,
                      'mountPoint' => $mountPoint,
                      'mount' => $mount
          Severity: Minor
          Found in lib/private/Encryption/EncryptionWrapper.php - About 1 hr to fix

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

                protected function execute(InputInterface $input, OutputInterface $output): int {
                    try {
                        $this->checkInput($input);
                    } catch (\InvalidArgumentException $e) {
                        $output->writeln('<error>' . $e->getMessage() . '</error>');
            Severity: Minor
            Found in core/Command/User/Setting.php - About 1 hr to fix

              Function update has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      update: function () {
                          if (GroupList.updating) {
                              return;
                          }
                          GroupList.updating = true;
              Severity: Minor
              Found in settings/js/users/groups.js - About 1 hr to fix

                Function checkExistingFiles has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    checkExistingFiles: function (selection, callbacks) {
                        var self = this;
                        var fileList = this.fileList;
                        var conflicts = [];
                        // only keep non-conflicting uploads
                Severity: Minor
                Found in apps/files/js/file-upload.js - About 1 hr to fix

                  Function getResponse has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      getResponse: function() {
                          var response = this.data.response();
                          if (response.errorThrown) {
                              if (response.errorThrown === 'timeout') {
                                  return {
                  Severity: Minor
                  Found in apps/files/js/file-upload.js - About 1 hr to fix

                    Function update has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            update: function() {
                                if (!this.$el) {
                                    return;
                                }
                                if (!this.summary.totalFiles && !this.summary.totalDirs) {
                    Severity: Minor
                    Found in apps/files/js/filesummary.js - About 1 hr to fix

                      Function parseQueryString has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          parseQueryString: function (queryString) {
                              var parts,
                                  pos,
                                  components,
                                  result = {},
                      Severity: Minor
                      Found in core/js/js.js - About 1 hr to fix

                        Method onReport has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function onReport($reportName, $report, $uri) {
                                $node = $this->server->tree->getNodeForPath($uri);
                                if (!$node instanceof EntityCollection || $reportName !== self::REPORT_NAME) {
                                    throw new ReportNotSupported();
                                }
                        Severity: Minor
                        Found in apps/comments/lib/Dav/CommentsPlugin.php - About 1 hr to fix

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

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

                            Method updateStorageStatus has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private function updateStorageStatus(IStorageConfig &$storage, $configInput, OutputInterface $output) {
                                    try {
                                        try {
                                            $this->manipulateStorageConfig($storage);
                                        } catch (InsufficientDataForMeaningfulAnswerException $e) {
                            Severity: Minor
                            Found in apps/files_external/lib/Command/Verify.php - About 1 hr to fix

                              Method getAutoExpireList has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  protected static function getAutoExpireList($time, $versions) {
                                      $size = 0;
                                      $toDelete = [];  // versions we want to delete
                              
                                      $interval = 1;
                              Severity: Minor
                              Found in apps/files_versions/lib/Storage.php - About 1 hr to fix

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

                                    public function execute(InputInterface $input, OutputInterface $output): int {
                                        $pathOption = $input->getOption('path');
                                        $userName = $input->getOption('user');
                                
                                        $scanUserFunction = function (IUser $user) use ($input, $output) {
                                Severity: Minor
                                Found in apps/files/lib/Command/VerifyChecksums.php - About 1 hr to fix

                                  Method store has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public static function store($filename) {
                                          if (\OC::$server->getConfig()->getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
                                              // if the file gets streamed we need to remove the .part extension
                                              // to get the right target
                                              $ext = \pathinfo($filename, PATHINFO_EXTENSION);
                                  Severity: Minor
                                  Found in apps/files_versions/lib/Storage.php - About 1 hr to fix

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

                                        protected function execute(InputInterface $input, OutputInterface $output): int {
                                            $inputPath = $input->getOption('path');
                                            $groups = $input->getOption('groups') ? \explode(',', $input->getOption('groups')) : [];
                                            $groups = \array_unique(\array_merge($groups, $input->getOption('group')));
                                            $shouldRepairStoragesIndividually = (bool) $input->getOption('repair');
                                    Severity: Minor
                                    Found in apps/files/lib/Command/Scan.php - About 1 hr to fix

                                      Method fopen has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function fopen($path, $mode) {
                                              $fullPath = $this->buildPath($path);
                                              $useExisting = true;
                                              switch ($mode) {
                                                  case 'r':
                                      Severity: Minor
                                      Found in lib/private/Files/Storage/Flysystem.php - About 1 hr to fix

                                        Method deleteTags has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function deleteTags($tagIds) {
                                                if (!\is_array($tagIds)) {
                                                    $tagIds = [$tagIds];
                                                }
                                        
                                        
                                        Severity: Minor
                                        Found in lib/private/SystemTag/SystemTagManager.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language