owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

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

    public function getShareById($id, $recipientId = null) {
        if (!ctype_digit($id)) {
            // share id is defined as a field of type integer
            // if someone calls the API asking for a share id like "abc"
            // then there is no point trying to query the database,
Severity: Minor
Found in lib/private/Share20/DefaultShareProvider.php - About 1 hr to fix

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

        public function getSharesBy($userId, $shareType, $path = null, $reshares = false, $limit = 50, $offset = 0) {
            if ($path !== null &&
                    !($path instanceof \OCP\Files\File) &&
                    !($path instanceof \OCP\Files\Folder)) {
                throw new \InvalidArgumentException('invalid path');
    Severity: Minor
    Found in lib/private/Share20/Manager.php - About 1 hr to fix

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

          protected function decryptAllUsersFiles($user = '') {
              $this->output->writeln("\n");
      
              $progress = new ProgressBar($this->output);
              $progress->setFormat(" %message% \n [%bar%]");
      Severity: Minor
      Found in lib/private/Encryption/DecryptAll.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 {
                $t = new Table($output);
                $displayInvalidJobs = $input->getOption('display-invalid-jobs');
                $headers = ['Job ID', 'Job', 'Job Arguments', 'Last Run', 'Last Checked', 'Reserved At', 'Execution Duration (s)'];
                if ($displayInvalidJobs) {
        Severity: Minor
        Found in core/Command/Background/Queue/Status.php - About 1 hr to fix

          Method __construct has 13 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  $appName,
                  IRequest $request,
                  IConfig $config,
                  IURLGenerator $urlGenerator,
                  IUserManager $userManager,
          Severity: Major
          Found in apps/files_sharing/lib/Controllers/ShareController.php - About 1 hr to fix

            Function _onClickRestoreSelected has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    _onClickRestoreSelected: 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 attach has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      attach: function(fileList) {
                          this._extendFileActions(fileList);
              
                          var oldCreateRow = fileList._createRow;
                          fileList._createRow = function(fileData) {
              Severity: Minor
              Found in apps/files/js/filelockplugin.js - About 1 hr to fix

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

                                send = function () {
                                    that._sending += 1;
                                    // Set timer for bitrate progress calculation:
                                    options._bitrateTimer = new that._BitrateTimer();
                                    jqXHR = jqXHR || (
                Severity: Minor
                Found in apps/files/js/jquery.fileupload.js - About 1 hr to fix

                  Function _checkSecurityHeaders has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          _checkSecurityHeaders: function(xhr) {
                              var messages = [];
                  
                              if (xhr.status === 200) {
                                  var securityHeaders = {
                  Severity: Minor
                  Found in core/js/setupchecks.js - About 1 hr to fix

                    Function _checkSSL has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            _checkSSL: function(xhr) {
                                var messages = [];
                    
                                if (xhr.status === 200) {
                                    var docPlaceholderUrl = '';
                    Severity: Minor
                    Found in core/js/setupchecks.js - About 1 hr to fix

                      Function filePath has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          filePath: function (app, type, file) {
                              var isCore = OC.coreApps.indexOf(app) !== -1,
                                  link = OC.getRootPath();
                              if (file.substring(file.length - 3) === 'php' && !isCore) {
                                  link += '/index.php/apps/' + app;
                      Severity: Minor
                      Found in core/js/js.js - About 1 hr to fix

                        Function extend has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        jQuery.extend = jQuery.fn.extend = function() {
                            var options, name, src, copy, copyIsArray, clone,
                                target = arguments[0] || {},
                                i = 1,
                                length = arguments.length,
                        Severity: Minor
                        Found in core/js/js.js - About 1 hr to fix

                          Method buildSuperShares has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function buildSuperShares(array $allShares, \OCP\IUser $user) {
                                  $result = [];
                          
                                  $groupedShares = $this->groupShares($allShares);
                          
                          
                          Severity: Minor
                          Found in apps/files_sharing/lib/MountProvider.php - About 1 hr to fix

                            Method getShares has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function getShares($includingPending = false) {
                                    $shares = [];
                                    $groupExternalManager = null;
                            
                                    foreach ($this->externalManager->getAcceptedShares() as $shareInfo) {
                            Severity: Minor
                            Found in apps/files_sharing/lib/Controller/RemoteOcsController.php - About 1 hr to fix

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

                                  public function fopen($path, $mode) {
                                      if ($source = $this->getSourcePath($path)) {
                                          switch ($mode) {
                                              case 'r+':
                                              case 'rb+':
                              Severity: Minor
                              Found in apps/files_sharing/lib/SharedStorage.php - About 1 hr to fix

                                Method requestReShare has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function requestReShare($token, $id, $shareId, $remote, $shareWith, $permission) {
                                        $data = [
                                            'shareWith' => $shareWith,
                                            'senderId' => $shareId
                                        ];
                                Severity: Minor
                                Found in apps/federatedfilesharing/lib/Notifications.php - About 1 hr to fix

                                  Method getChangesForCalendar has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function getChangesForCalendar($calendarId, $syncToken, $syncLevel, $limit = null) {
                                          // Current synctoken
                                          $stmt = $this->db->prepare('SELECT `synctoken` FROM `*PREFIX*calendars` WHERE `id` = ?');
                                          $stmt->execute([ $calendarId ]);
                                          $currentToken = $stmt->fetchColumn(0);
                                  Severity: Minor
                                  Found in apps/dav/lib/CalDAV/CalDavBackend.php - About 1 hr to fix

                                    Method getChangesForAddressBook has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function getChangesForAddressBook($addressBookId, $syncToken, $syncLevel, $limit = null) {
                                            // Current synctoken
                                            $stmt = $this->db->prepare('SELECT `synctoken` FROM `*PREFIX*addressbooks` WHERE `id` = ?');
                                            $stmt->execute([ $addressBookId ]);
                                            $currentToken = $stmt->fetchColumn();
                                    Severity: Minor
                                    Found in apps/dav/lib/CardDAV/CardDavBackend.php - About 1 hr to fix

                                      Method printUpgradePage has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private static function printUpgradePage() {
                                              $systemConfig = \OC::$server->getSystemConfig();
                                      
                                              $disableWebUpdater = $systemConfig->getValue('upgrade.disable-web', false);
                                              $tooBig = false;
                                      Severity: Minor
                                      Found in lib/kernel.php - About 1 hr to fix

                                        Method stream_open has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function stream_open($path, $mode, $options, &$opened_path) {
                                                switch ($mode[0]) {
                                                    case 'r':
                                                        if (!isset(self::$data[$path])) {
                                                            return false;
                                        Severity: Minor
                                        Found in lib/private/Files/Stream/StaticStream.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language