owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Method syncRemoteAddressBook has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function syncRemoteAddressBook($url, $userName, $sharedSecret, $syncToken, $targetBookId, $targetPrincipal, $targetProperties) {
        // 1. create addressbook
        $book = $this->ensureSystemAddressBookExists($targetPrincipal, $targetBookId, $targetProperties);
        $addressBookId = $book['id'];

Severity: Minor
Found in apps/dav/lib/CardDAV/SyncService.php - About 1 hr to fix

    Method updateAddressBook has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function updateAddressBook($addressBookId, \Sabre\DAV\PropPatch $propPatch) {
            $supportedProperties = [
                '{DAV:}displayname',
                '{' . Plugin::NS_CARDDAV . '}addressbook-description',
            ];
    Severity: Minor
    Found in apps/dav/lib/CardDAV/CardDavBackend.php - About 1 hr to fix

      Method deleteCard has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function deleteCard($addressBookId, $cardUri) {
              try {
                  $cardId = $this->getCardId($addressBookId, $cardUri);
              } catch (\InvalidArgumentException $e) {
                  $cardId = null;
      Severity: Minor
      Found in apps/dav/lib/CardDAV/CardDavBackend.php - About 1 hr to fix

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

            public static function delete($path) {
                $deletedFile = self::$deletedFiles[$path];
                $uid = $deletedFile['uid'];
                $filename = $deletedFile['filename'];
        
        
        Severity: Minor
        Found in apps/files_versions/lib/Storage.php - About 1 hr to fix

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

              public function __construct(array $urlParams = []) {
                  parent::__construct('files_versions', $urlParams);
          
                  $container = $this->getContainer();
          
          
          Severity: Minor
          Found in apps/files_versions/lib/AppInfo/Application.php - About 1 hr to fix

            Method adjustShareOwner has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function adjustShareOwner($shareId, $shareType, $newUidOwner) {
                    $query = $this->connection->getQueryBuilder();
            
                    $query->update('share')
                        ->set('uid_owner', $query->createParameter('uid_owner'))
            Severity: Minor
            Found in apps/files/lib/Command/TroubleshootTransferOwnership.php - About 1 hr to fix

              Method userScan has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  protected function userScan($users, $inputPath, $shouldRepairStoragesIndividually, $input, $output, $verbose) {
                      $users_total = \count($users);
                      $user_count = 0;
                      foreach ($users as $user) {
                          if (\is_object($user)) {
              Severity: Minor
              Found in apps/files/lib/Command/Scan.php - About 1 hr to fix

                Method checkConfig has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function checkConfig() {
                        $l = \OC::$server->getL10N('lib');
                
                        // Create config if it does not already exist
                        $configFilePath = self::$configDir .'/config.php';
                Severity: Minor
                Found in lib/kernel.php - About 1 hr to fix

                  Method getAllTags has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getAllTags($visibilityFilter = null, $nameSearchPattern = null) {
                          $tags = [];
                  
                          $query = $this->connection->getQueryBuilder();
                          $query->select('*')
                  Severity: Minor
                  Found in lib/private/SystemTag/SystemTagManager.php - About 1 hr to fix

                    Method getCacheEntry has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function getCacheEntry($storage, $internalPath, $relativePath) {
                            $cache = $storage->getCache($internalPath);
                            $data = $cache->get($internalPath);
                            $watcher = $storage->getWatcher($internalPath);
                    
                    
                    Severity: Minor
                    Found in lib/private/Files/View.php - About 1 hr to fix

                      Method haveTag has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function haveTag($objIds, $objectType, $tagId, $all = true) {
                              $this->assertTagsExist([$tagId]);
                      
                              if (!\is_array($objIds)) {
                                  $objIds = [$objIds];
                      Severity: Minor
                      Found in lib/private/SystemTag/SystemTagObjectMapper.php - About 1 hr to fix

                        Method updateEncryptedVersion has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private function updateEncryptedVersion(Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $isRename) {
                                $isEncrypted = $this->encryptionManager->isEnabled() && $this->mount->getOption('encrypt', true) ? 1 : 0;
                                $cacheInformation = [
                                    'encrypted' => (bool)$isEncrypted,
                                ];
                        Severity: Minor
                        Found in lib/private/Files/Storage/Wrapper/Encryption.php - About 1 hr to fix

                          Method moveFromStorage has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function moveFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
                                  if ($sourceStorage === $this) {
                                      return $this->copy($sourceInternalPath, $targetInternalPath);
                                  }
                                  // cross storage moves need to perform a move operation
                          Severity: Minor
                          Found in lib/private/Files/ObjectStore/ObjectStoreStorage.php - About 1 hr to fix

                            Method addToCache has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private function addToCache(ICachedMountInfo $mount) {
                                    if ($mount->getStorageId() !== -1) {
                                        try {
                                            $rows = $this->connection->insertIfNotExist(
                                                '*PREFIX*mounts',
                            Severity: Minor
                            Found in lib/private/Files/Config/UserMountCache.php - About 1 hr to fix

                              Method rename has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function rename($path1, $path2) {
                                      $this->init();
                                      $path1 = $this->cleanPath($path1);
                                      $path2 = $this->cleanPath($path2);
                                      try {
                              Severity: Minor
                              Found in lib/private/Files/Storage/DAV.php - About 1 hr to fix

                                Method calculateFolderSize has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function calculateFolderSize($path, $entry = null) {
                                        if ($path !== '/' and $path !== '' and $path !== 'files' and $path !== 'files_trashbin' and $path !== 'files_versions') {
                                            return parent::calculateFolderSize($path, $entry);
                                        } elseif ($path === '' or $path === '/') {
                                            // since the size of / isn't used (the size of /files is used instead) there is no use in calculating it
                                Severity: Minor
                                Found in lib/private/Files/Cache/HomeCache.php - About 1 hr to fix

                                  Method createStorage has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function createStorage(
                                          $mountPoint,
                                          $backendIdentifier,
                                          $authMechanismIdentifier,
                                          $backendOptions,
                                  Severity: Minor
                                  Found in lib/private/Files/External/Service/StoragesService.php - About 1 hr to fix

                                    Method createDBUser has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private function createDBUser($connection) {
                                            $e_name = \pg_escape_string($this->dbUser);
                                            $e_password = \pg_escape_string($this->dbPassword);
                                            $query = "select * from pg_roles where rolname='$e_name';";
                                            $result = \pg_query($connection, $query);
                                    Severity: Minor
                                    Found in lib/private/Setup/PostgreSQL.php - About 1 hr to fix

                                      Method moveAvatars has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private function moveAvatars(IOutput $out, IUser $user) {
                                              $userId = $user->getUID();
                                      
                                              try {
                                                  \OC\Files\Filesystem::initMountPoints($userId);
                                      Severity: Minor
                                      Found in lib/private/Repair/MoveAvatarOutsideHome.php - About 1 hr to fix

                                        Method removeSharesNonExistingParent has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            private function removeSharesNonExistingParent(IOutput $out) {
                                                $deletedEntries = 0;
                                        
                                                $query = $this->connection->getQueryBuilder();
                                                $query->select('s1.parent')
                                        Severity: Minor
                                        Found in lib/private/Repair/RepairInvalidShares.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language