owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Method displayNamesInGroup has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
        $group = $this->get($gid);
        if ($group === null) {
            return [];
        }
Severity: Minor
Found in lib/private/Group/Manager.php - About 1 hr to fix

    Method mimeTypeIcon has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function mimeTypeIcon($mimetype) {
            $this->loadAliases();
    
            while (isset($this->mimeTypeAlias[$mimetype])) {
                $mimetype = $this->mimeTypeAlias[$mimetype];
    Severity: Minor
    Found in lib/private/Files/Type/Detection.php - About 1 hr to fix

      Method registerBackend has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function registerBackend($itemType, $class, $collectionOf = null, $supportedFileExtensions = null) {
              if (self::isEnabled()) {
                  if (!isset(self::$backendTypes[$itemType])) {
                      self::$backendTypes[$itemType] = [
                          'class' => $class,
      Severity: Minor
      Found in lib/private/Share/Share.php - About 1 hr to fix

        Method resolveGroupShares has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function resolveGroupShares($shares, $userId) {
                $qb = $this->dbConn->getQueryBuilder();
        
                list($chunkedShareIds, $shareIdToShareMap) = $this->chunkSharesToMaps($shares);
                foreach ($chunkedShareIds as $shareIdsChunk) {
        Severity: Minor
        Found in lib/private/Share20/DefaultShareProvider.php - About 1 hr to fix

          Method executeAudited has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function executeAudited($stmt, array $parameters = null) {
                  if (\is_string($stmt)) {
                      // convert to an array with 'sql'
                      if (\stripos($stmt, 'LIMIT') !== false) { //OFFSET requires LIMIT, so we only need to check for LIMIT
                          // TODO try to convert LIMIT OFFSET notation to parameters
          Severity: Minor
          Found in lib/private/legacy/db.php - About 1 hr to fix

            Method removeListener has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function removeListener($scope = null, $method = null, callable $callback = null) {
                    $names = [];
                    $allNames = \array_keys($this->listeners);
                    if ($scope and $method) {
                        $name = $scope . '::' . $method;
            Severity: Minor
            Found in lib/private/Hooks/EmitterTrait.php - About 1 hr to fix

              Method getNormalizedLanguages has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getNormalizedLanguages(IFactory $langFactory, $activeLangCode) {
                      $userLang = null;
                      $commonLanguages = [];
                      $languages = [];
              
              
              Severity: Minor
              Found in lib/private/Helper/LocaleHelper.php - About 1 hr to fix

                Method delete has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function delete(): bool {
                        if ($this->emitter) {
                            $this->emitter->emit('\OC\User', 'preDelete', [$this]);
                        }
                        // get the home now because it won't return it after user deletion
                Severity: Minor
                Found in lib/private/User/User.php - About 1 hr to fix

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

                      protected function execute(InputInterface $input, OutputInterface $output): int {
                          if (!$input->getOption('accept-warning')) {
                              $helper = new QuestionHelper();
                              $q = <<<EOS
                  <question>This command is for maintenance and support purposes. 
                  Severity: Minor
                  Found in core/Command/Background/Queue/Execute.php - About 1 hr to fix

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

                        protected function configure() {
                            parent::configure();
                    
                            $this
                                ->setName('app:list')
                    Severity: Minor
                    Found in core/Command/App/ListApps.php - About 1 hr to fix

                      Function createDragShadow has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var createDragShadow = function(event) {
                          // FIXME: inject file list instance somehow
                          /* global FileList, Files */
                      
                          //select dragged file
                      Severity: Minor
                      Found in apps/files/js/files.js - About 1 hr to fix

                        Function _updateDetailsView has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                _updateDetailsView: function(fileName, show) {
                                    if (!this._detailsView) {
                                        return;
                                    }
                        
                        
                        Severity: Minor
                        Found in apps/files/js/filelist.js - About 1 hr to fix

                          Function addResults has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      function addResults(results) {
                                          var $template = $searchResults.find('tr.template');
                                          jQuery.each(results, function (i, result) {
                                              var $row = $template.clone();
                                              $row.removeClass('template');
                          Severity: Minor
                          Found in core/search/js/search.js - About 1 hr to fix

                            Method sendTestMail has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function sendTestMail() {
                                    $email = $this->request->getParam('mail_to_address');
                            
                                    if (empty($email)) {
                                        $email = $this->userSession->getUser()->getEMailAddress();
                            Severity: Minor
                            Found in settings/Controller/MailSettingsController.php - About 1 hr to fix

                              Method getMissingInitiator has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private function getMissingInitiator($n = 1000) {
                                      $query = $this->connection->getQueryBuilder();
                                      $query->select(['id', 'uid_owner', 'share_type'])
                                          ->from($this->table)
                                          ->where($query->expr()->in(
                              Severity: Minor
                              Found in apps/files_sharing/lib/Migration.php - About 1 hr to fix

                                Method acceptShare has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function acceptShare($id) {
                                        $share = $this->getShare($id);
                                
                                        if ($share) {
                                            $mountPoint = $this->getShareRecipientMountPoint($share);
                                Severity: Minor
                                Found in apps/files_sharing/lib/External/Manager.php - About 1 hr to fix

                                  Method emitAccessShareHook has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      protected function emitAccessShareHook($share, $errorCode = 200, $errorMessage = '') {
                                          $itemType = $itemSource = $uidOwner = '';
                                          $token = $share;
                                          $exception = null;
                                          if ($share instanceof \OCP\Share\IShare) {
                                  Severity: Minor
                                  Found in apps/files_sharing/lib/Controllers/ShareController.php - About 1 hr to fix

                                    Method parseRetentionObligation has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private function parseRetentionObligation() {
                                            $splitValues = \explode(',', $this->retentionObligation);
                                            if (!isset($splitValues[0])) {
                                                $minValue = self::DEFAULT_RETENTION_OBLIGATION;
                                            } else {
                                    Severity: Minor
                                    Found in apps/files_trashbin/lib/Expiration.php - About 1 hr to fix

                                      Method createConfidentialObject has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private static function createConfidentialObject($calData) {
                                              $vObject = Reader::read($calData);
                                      
                                              /** @var Component $vElement */
                                              $vElement = null;
                                      Severity: Minor
                                      Found in apps/dav/lib/CalDAV/CalendarObject.php - About 1 hr to fix

                                        Method unshare has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function unshare($remoteId, $shareToken) {
                                                $query = $this->dbConnection->getQueryBuilder();
                                                $query->select('*')->from($this->externalShareTable)
                                                    ->where(
                                                        $query->expr()->eq(
                                        Severity: Minor
                                        Found in apps/federatedfilesharing/lib/FederatedShareProvider.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language