owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Method rename has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function rename($path1, $path2) {
        $file = $this->getDriveFile($path1);
        if ($file) {
            $newFile = $this->getDriveFile($path2);
            $toUpdate = new DriveFile();
Severity: Minor
Found in apps/files_external/lib/Lib/Storage/Google.php - About 1 hr to fix

    Method doFind has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function doFind($script) {
            $fullScript = $this->addExtension($script);
            $themeDirectory = $this->theme->getDirectory();
            $baseDirectory = $this->theme->getBaseDirectory();
            $webRoot = '';
    Severity: Minor
    Found in lib/private/Template/JSResourceLocator.php - About 1 hr to fix

      Method file_put_contents has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function file_put_contents($path, $data) {
              return $this->emittingCall(function () use (&$path, &$data) {
                  if (\is_resource($data)) { //not having to deal with streams in file_put_contents makes life easier
                      $absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path));
                      if (Filesystem::isValidPath($path)
      Severity: Minor
      Found in lib/private/Files/View.php - About 1 hr to fix

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

            public function update($id, array $data) {
                unset(self::$path_cache[(int)$id]);
                if (isset($data['path'])) {
                    // normalize path
                    $data['path'] = $this->normalize($data['path']);
        Severity: Minor
        Found in lib/private/Files/Cache/Cache.php - About 1 hr to fix

          Method scan has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function scan($dir = '') {
                  if (!Filesystem::isValidPath($dir)) {
                      throw new \InvalidArgumentException('Invalid path to scan');
                  }
                  $mounts = $this->getMounts($dir);
          Severity: Minor
          Found in lib/private/Files/Utils/Scanner.php - About 1 hr to fix

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

                public function fopen($path, $mode) {
                    $path = $this->normalizePath($path);
            
                    switch ($mode) {
                        case 'r':
            Severity: Minor
            Found in lib/private/Files/ObjectStore/ObjectStoreStorage.php - About 1 hr to fix

              Method getMountsForUser has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getMountsForUser(IUser $user, IStorageFactory $loader) {
                      $mounts = [];
              
                      // setUser is in UserTrait.
                      /* @phan-suppress-next-line PhanUndeclaredMethod */
              Severity: Minor
              Found in lib/private/Files/External/ConfigAdapter.php - About 1 hr to fix

                Method handleChildren has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function handleChildren($path, $recursive, $reuse, $folderId, $lock, &$size) {
                        // we put this in it's own function so it cleans up the memory before we start recursing
                        $existingChildren = $this->getExistingChildren($folderId);
                        $newChildren = $this->getNewChildren($path);
                
                
                Severity: Minor
                Found in lib/private/Files/Cache/Scanner.php - About 1 hr to fix

                  Method centerCrop has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function centerCrop($size = 0) {
                          if (!$this->valid()) {
                              $this->logger->error('OC_Image->centerCrop, No image loaded', ['app' => 'core']);
                              return false;
                          }
                  Severity: Minor
                  Found in lib/private/legacy/image.php - About 1 hr to fix

                    Method syncMultipleUsers has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function syncMultipleUsers(
                            InputInterface $input,
                            OutputInterface $output,
                            SyncService $syncService,
                            UserInterface $backend,
                    Severity: Minor
                    Found in core/Command/User/SyncBackend.php - About 1 hr to fix

                      Function _onClickDeleteSelected has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              _onClickDeleteSelected: function(event) {
                                  event.preventDefault();
                                  var self = this;
                                  var allFiles = this.$el.find('.select-all').is(':checked');
                                  var files = [];
                      Severity: Minor
                      Found in apps/files_trashbin/js/filelist.js - About 1 hr to fix

                        Function send has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                send: function (data) {
                                    if (data && !this.options.disabled) {
                                        if (data.fileInput && !data.files) {
                                            var that = this,
                                                dfd = $.Deferred(),
                        Severity: Minor
                        Found in apps/files/js/jquery.fileupload.js - About 1 hr to fix

                          Function _nextPage has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  _nextPage: function(animate) {
                                      var index = this.$fileList.children().length,
                                          count = this.pageSize(),
                                          hidden,
                                          tr,
                          Severity: Minor
                          Found in apps/files/js/filelist.js - About 1 hr to fix

                            Function show has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    show: function() {
                                        var self = this;
                                        var title = t('core', 'Edit link share: {name}', {name: this.itemModel.getFileInfo().getFullPath()});
                                        var buttons = [{
                                            text: t('core', 'Cancel'),
                            Severity: Minor
                            Found in core/js/sharedialoglinkshareview.js - About 1 hr to fix

                              Function _fillFilePicker has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  _fillFilePicker:function(dir) {
                                      var dirs = [];
                                      var others = [];
                                      var self = this;
                                      this.$filelist.empty().addClass('icon-loading');
                              Severity: Minor
                              Found in core/js/oc-dialogs.js - About 1 hr to fix

                                Function prompt has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    prompt: function (text, title, callback, modal, name, password, buttonDeclineText, buttonConfirmText) {
                                        return $.when(this._getMessageTemplate()).then(function ($tmpl) {
                                            var dialogName = 'oc-dialog-' + OCdialogs.dialogsCounter + '-content';
                                            var dialogId = '#' + dialogName;
                                            var $dlg = $tmpl.octemplate({
                                Severity: Minor
                                Found in core/js/oc-dialogs.js - About 1 hr to fix

                                  Method tryHttpPostToShareEndpoint has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      protected function tryHttpPostToShareEndpoint($remoteDomain, $urlSuffix, array $fields, $useOcm = false) {
                                          $client = $this->httpClientService->newClient();
                                          $protocol = 'https://';
                                          $result = [
                                              'success' => false,
                                  Severity: Minor
                                  Found in apps/federatedfilesharing/lib/Notifications.php - About 1 hr to fix

                                    Method getPublicCalendar has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

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

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

                                          protected function updateProperties($path, INode $node, $changedProperties) {
                                              $existingProperties = $this->getProperties($path, $node, []);
                                              '@phan-var \OCA\DAV\Connector\Sabre\Node $node';
                                              $fileId = $node->getId();
                                      
                                      
                                      Severity: Minor
                                      Found in apps/dav/lib/DAV/FileCustomPropertiesBackend.php - About 1 hr to fix

                                        Method __construct has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function __construct(array $urlParams= []) {
                                                parent::__construct('files', $urlParams);
                                                $container = $this->getContainer();
                                                $server = $container->getServer();
                                        
                                        
                                        Severity: Minor
                                        Found in apps/files/lib/AppInfo/Application.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language