owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

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

    protected function execute(InputInterface $input, OutputInterface $output): int {
        $groupName = $input->getArgument('group');
        $group = $this->groupManager->get($groupName);
        $errorFound = false;
        if (!$group) {
Severity: Minor
Found in core/Command/Group/RemoveMember.php - About 1 hr to fix

    Method postCroppedAvatar has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function postCroppedAvatar($crop) {
            $userId = $this->userSession->getUser()->getUID();
    
            if ($crop === null) {
                return new DataResponse(
    Severity: Minor
    Found in core/Controller/AvatarController.php - About 1 hr to fix

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

              $appName,
              IRequest $request,
              IGroupManager $groupManager,
              IUserManager $userManager,
              IManager $contactsManager,
      Severity: Major
      Found in apps/files_sharing/lib/Controller/ShareesController.php - About 1 hr to fix

        Function _showMountOptionsDropdown has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _showMountOptionsDropdown: function($tr) {
                if (this._preventNextDropdown) {
                    // prevented because the click was on the toggle
                    this._preventNextDropdown = false;
                    return;
        Severity: Minor
        Found in apps/files_external/js/settings.js - About 1 hr to fix

          Function _resize has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  _resize: function() {
                      var i, $crumb, $ellipsisCrumb;
          
                      if (!this.availableWidth) {
                          this.availableWidth = this.$el.width();
          Severity: Minor
          Found in apps/files/js/breadcrumb.js - About 1 hr to fix

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

                update: function (gid, limit) {
                    if (UserList.updating) {
                        return;
                    }
                    if(!limit) {
            Severity: Minor
            Found in settings/js/users/users.js - About 1 hr to fix

              Function _setShareTreeUserGroupView has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      _setShareTreeUserGroupView: function() {
                          var self  = this;
                          var $list = $('<ul>', { id : 'shareTreeUserGroupList' });
              
                          if (! _.keys(self._shareTreeCache).length > 0) {
              Severity: Minor
              Found in apps/files/js/filelist.js - About 1 hr to fix

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

                        render: function() {
                            if (!this.model.hasReshare()
                                || this.model.getReshareOwner() === OC.currentUser)
                            {
                                this.$el.empty();
                Severity: Minor
                Found in core/js/sharedialogresharerinfoview.js - About 1 hr to fix

                  Function _moveOrCopy has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

                    Method translateLong has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        protected function translateLong($text, IL10N $l, array $params) {
                            switch ($text) {
                                case self::CREATE_TAG:
                                    $params[1] = $this->convertParameterToTag($params[1], $l);
                                    if ($this->actorIsCurrentUser($params[0])) {
                    Severity: Minor
                    Found in apps/systemtags/lib/Activity/Extension.php - About 1 hr to fix

                      Method sendUpdateToRemote has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function sendUpdateToRemote($remote, $remoteId, $token, $action, $data = [], $try = 0) {
                              $ocmNotification = $this->notificationManager->convertToOcmFileNotification($remoteId, $token, $action, $data);
                              $ocmFields = $ocmNotification->toArray();
                              $url = \rtrim(
                                  $this->addressHandler->removeProtocolFromUrl($remote),
                      Severity: Minor
                      Found in apps/federatedfilesharing/lib/Notifications.php - About 1 hr to fix

                        Method getUsersOwnCalendars has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

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

                          Method removeFromGroup has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function removeFromGroup($parameters) {
                                  // Check if user is logged in
                                  $loggedInUser = $this->userSession->getUser();
                                  if ($loggedInUser === null) {
                                      return new Result(null, API::RESPOND_UNAUTHORISED);
                          Severity: Minor
                          Found in apps/provisioning_api/lib/Users.php - About 1 hr to fix

                            Method emitPreHooks has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private function emitPreHooks($exists, $path = null) {
                                    if ($path === null) {
                                        $path = $this->path;
                                    }
                                    $hookPath = Filesystem::getView()->getRelativePath($this->fileView->getAbsolutePath($path));
                            Severity: Minor
                            Found in apps/dav/lib/Connector/Sabre/File.php - About 1 hr to fix

                              Method getACL has 37 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/PublicSharedRootNode.php - About 1 hr to fix

                                Method run has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function run(IOutput $out) {
                                        if (!$this->config->getSystemValue('installed', false)) {
                                            // Skip the migration for new installations -> nothing to migrate
                                            return;
                                        }
                                Severity: Minor
                                Found in apps/files_external/appinfo/Migrations/Version20220329110116.php - About 1 hr to fix

                                  Method configure has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      protected function configure() {
                                          $this
                                              ->setName('files_external:create')
                                              ->setDescription('Create a new mount configuration')
                                              ->addOption(
                                  Severity: Minor
                                  Found in apps/files_external/lib/Command/Create.php - About 1 hr to fix

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

                                        public function update(
                                            $id,
                                            $mountPoint,
                                            $backend,
                                            $authMechanism,
                                    Severity: Minor
                                    Found in apps/files_external/lib/Controller/UserStoragesController.php - About 1 hr to fix

                                      Method expireOlderThanMaxForUser has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public static function expireOlderThanMaxForUser($uid) {
                                              $expiration = self::getExpiration();
                                              $threshold = $expiration->getMaxAgeAsTimestamp();
                                              $versions = self::getFileHelper()->getAllVersions($uid);
                                              if (!$threshold || !\array_key_exists('all', $versions)) {
                                      Severity: Minor
                                      Found in apps/files_versions/lib/Storage.php - About 1 hr to fix

                                        Method getQueryForFilter has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function getQueryForFilter($filter) {
                                                $user = $this->activityManager->getCurrentUserId();
                                                // Display actions from all files
                                                if ($filter === self::FILTER_FILES) {
                                                    return ['`app` = ?', [self::APP_FILES]];
                                        Severity: Minor
                                        Found in apps/files/lib/Activity.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language