owncloud/core

View on GitHub

Showing 4,504 of 4,504 total issues

Function initialize has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        initialize: function() {
            Files.bindKeyboardShortcuts(document, $);

            // TODO: move file list related code (upload) to OCA.Files.FileList
            $('#file_action_panel').attr('activeAction', false);
Severity: Minor
Found in apps/files/js/files.js - About 1 hr to fix

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

            render: function() {
                var templateVars = {
                    closeLabel: t('files', 'Close')
                };
    
    
    Severity: Minor
    Found in apps/files/js/detailsview.js - About 1 hr to fix

      Function setFilter has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              setFilter:function(filter) {
                  var total = 0;
                  if (this._filter === filter) {
                      return;
                  }
      Severity: Minor
      Found in apps/files/js/filelist.js - About 1 hr to fix

        Function reload has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                reload: function() {
                    this._selectedFiles = {};
                    this._selectionSummary.clear();
                    if (this._currentFileModel) {
                        this._currentFileModel.off();
        Severity: Minor
        Found in apps/files/js/filelist.js - About 1 hr to fix

          Function unlock has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  unlock: function(path, token, options) {
                      if (!path) {
                          throw 'Missing argument "path"';
                      }
                      if (!token) {
          Severity: Minor
          Found in core/js/files/client.js - About 1 hr to fix

            Method splitUserRemote has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function splitUserRemote($address) {
                    if (\strpos($address, '@') === false) {
                        throw new \Exception('Invalid Federated Cloud ID');
                    }
            
            
            Severity: Minor
            Found in apps/files_sharing/lib/Controller/ShareesController.php - About 1 hr to fix

              Method sendRemoteShare has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function sendRemoteShare(
                      Address $shareWithAddress,
                      Address $ownerAddress,
                      Address $sharedByAddress,
                      $token,
              Severity: Minor
              Found in apps/federatedfilesharing/lib/Notifications.php - About 1 hr to fix

                Method getSharePermissions has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getSharePermissions($user) {
                        // check of we access a federated share
                        if ($user !== null) {
                            try {
                                $share = $this->shareManager->getShareByToken($user);
                Severity: Minor
                Found in apps/dav/lib/Connector/Sabre/Node.php - About 1 hr to fix

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

                      public function getACL() {
                          $acl = [
                              [
                                  'privilege' => '{DAV:}all',
                                  'principal' => '{DAV:}owner',
                  Severity: Minor
                  Found in apps/dav/lib/Files/PublicFiles/SharedFolder.php - About 1 hr to fix

                    Method getSearchResultIterator has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function getSearchResultIterator($filesUri, $searchResults, $requestedProps, $maxResults) {
                            $paths = [];
                            foreach ($searchResults as $searchResult) {
                                $paths[$filesUri . $searchResult->path] = $searchResult;
                            }
                    Severity: Minor
                    Found in apps/dav/lib/Connector/Sabre/FilesSearchReportPlugin.php - About 1 hr to fix

                      Method httpPost has 29 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/DAV/Sharing/Plugin.php - About 1 hr to fix

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

                            public function registerHooks() {
                                /** @var HookManager $hm */
                                $hm = $this->getContainer()->query(HookManager::class);
                                $hm->setup();
                        
                        
                        Severity: Minor
                        Found in apps/dav/lib/AppInfo/Application.php - About 1 hr to fix

                          Method vCard2Array has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              protected function vCard2Array($uri, VCard $vCard) {
                                  $result = [
                                      'URI' => $uri,
                                  ];
                          
                          
                          Severity: Minor
                          Found in apps/dav/lib/CardDAV/AddressBookImpl.php - About 1 hr to fix

                            Method getPhoto has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function getPhoto(Card $node) {
                                    // TODO: this is kind of expensive - load carddav data from database and parse it
                                    //       we might want to build up a cache one day
                                    try {
                                        $vObject = $this->readCard($node->get());
                            Severity: Minor
                            Found in apps/dav/lib/CardDAV/ImageExportPlugin.php - About 1 hr to fix

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

                                  public function __construct($params) {
                                      // extract context path from host if specified
                                      // (owncloud install path on host)
                                      $host = $params['host'];
                                      // strip protocol
                              Severity: Minor
                              Found in apps/files_external/lib/Lib/Storage/OwnCloud.php - About 1 hr to fix

                                Method restoreShares has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private function restoreShares(OutputInterface $output) {
                                        $output->writeln("Restoring shares ...");
                                        $progress = new ProgressBar($output, \count($this->shares));
                                        $status = 0;
                                
                                
                                Severity: Minor
                                Found in apps/files/lib/Command/TransferOwnership.php - About 1 hr to fix

                                  Method touch has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function touch($path, $mtime = null) {
                                          $file = $this->getDriveFile($path);
                                          $toUpdate = new DriveFile();
                                          $result = false;
                                          if ($file) {
                                  Severity: Minor
                                  Found in apps/files_external/lib/Lib/Storage/Google.php - About 1 hr to fix

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

                                        public function fopen($path, $mode) {
                                            $hooks = [];
                                            switch ($mode) {
                                                case 'r':
                                                case 'rb':
                                    Severity: Minor
                                    Found in lib/private/Files/View.php - About 1 hr to fix

                                      Method getMultiBucketObjectStoreConfig has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private function getMultiBucketObjectStoreConfig(IUser $user) {
                                              $config = $this->config->getSystemValue('objectstore_multibucket');
                                              if (!\is_array($config)) {
                                                  return null;
                                              }
                                      Severity: Minor
                                      Found in lib/private/Files/Mount/ObjectHomeMountProvider.php - About 1 hr to fix

                                        Method jsonSerialize has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function jsonSerialize() {
                                                $result = [];
                                                if ($this->id !== null) {
                                                    $result['id'] = $this->id;
                                                }
                                        Severity: Minor
                                        Found in lib/private/Files/External/StorageConfig.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language