owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

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

    protected function update(IComment $comment) {
        return $this->emittingCall(function () use (&$comment) {
            $qb = $this->dbConn->getQueryBuilder();
            $affectedRows = $qb
                ->update('comments')
Severity: Minor
Found in lib/private/Comments/Manager.php - About 1 hr to fix

    Method getFileSizeViaCurl has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getFileSizeViaCurl($fileName) {
            if (\OC::$server->getIniWrapper()->getString('open_basedir') === '') {
                $pathParts = \explode('/', $fileName);
                $encodedPathParts = \array_map('rawurlencode', $pathParts);
                $encodedFileName = \implode('/', $encodedPathParts);
    Severity: Minor
    Found in lib/private/LargeFileHelper.php - About 1 hr to fix

      Method insert has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function insert(IComment &$comment) {
              $qb = $this->dbConn->getQueryBuilder();
              $affectedRows = $qb
                  ->insert('comments')
                  ->values([
      Severity: Minor
      Found in lib/private/Comments/Manager.php - About 1 hr to fix

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

            protected function execute(InputInterface $input, OutputInterface $output): int {
                // collate config setting to the end, to avoid partial configuration
                $toBeSet = [];
        
                if ($backend = $input->getOption('backend')) {
        Severity: Minor
        Found in core/Command/Log/Manage.php - About 1 hr to fix

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

              public function execute($command, $token, $params = []) {
                  try {
                      $this->validateRequest($command, $token);
          
                      $output = new BufferedOutput();
          Severity: Minor
          Found in core/Controller/OccController.php - About 1 hr to fix

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

                    processSharesToConfirm: function() {
                        var fileList = this.filesApp.fileList;
                        // check for new server-to-server shares which need to be approved
                        $.get(OC.generateUrl('/apps/files_sharing/api/externalShares'),
                        {},
            Severity: Minor
            Found in apps/files_sharing/js/external.js - About 1 hr to fix

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

                      processIncomingShareFromUrl: function() {
                          var fileList = this.filesApp.fileList;
                          var params = OC.Util.History.parseUrlQuery();
                          //manually add server-to-server share
                          if (params.remote && params.token && params.owner && params.name) {
              Severity: Minor
              Found in apps/files_sharing/js/external.js - About 1 hr to fix

                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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language