owncloud/core

View on GitHub

Showing 4,504 of 4,504 total issues

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

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

                          private function fixEntriesWithNonExistingParentIdEntry(IOutput $out, $storageNumericId = null) {
                              $qb = $this->connection->getQueryBuilder();
                              $this->addQueryConditionsNonExistingParentIdEntry($qb, $storageNumericId);
                              $qb->setMaxResults(self::CHUNK_SIZE);
                      
                      
                      Severity: Minor
                      Found in lib/private/Repair/RepairMismatchFileCachePath.php - About 1 hr to fix

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

                            public static function getSharedItemsOwners($user, $type, $includeCollections = false, $includeOwner = false) {
                                // First, we find out if $type is part of a collection (and if that collection is part of
                                // another one and so on).
                                $collectionTypes = [];
                                if (!$includeCollections || !$collectionTypes = self::getCollectionItemTypes($type)) {
                        Severity: Minor
                        Found in lib/private/Share/Share.php - About 1 hr to fix

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

                              public function getChildren(\OCP\Share\IShare $parent) {
                                  $children = [];
                          
                                  $qb = $this->dbConn->getQueryBuilder();
                                  $qb->select('*')
                          Severity: Minor
                          Found in lib/private/Share20/DefaultShareProvider.php - About 1 hr to fix

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

                                private function writeData() {
                                    // Create a php file ...
                                    $content = "<?php\n";
                                    $content .= '$CONFIG = ';
                                    $content .= \var_export($this->cache, true);
                            Severity: Minor
                            Found in lib/private/Config.php - About 1 hr to fix

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

                                  private function addUseNameToBlackList($name, $alias) {
                                      $name = \strtolower($name);
                                      $alias = \strtolower($alias);
                              
                                      foreach ($this->blackListedClassNames as $blackListedAlias => $blackListedClassName) {
                              Severity: Minor
                              Found in lib/private/App/CodeChecker/NodeVisitor.php - About 1 hr to fix

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

                                    public function addDirRecursive($dir, $internalDir='') {
                                        $dirname = \basename($dir);
                                        $rootDir = $internalDir . $dirname;
                                        if (!empty($rootDir)) {
                                            $dirOpts = [
                                Severity: Minor
                                Found in lib/private/Streamer.php - About 1 hr to fix

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

                                      public function preciseResize($width, $height) {
                                          if (!$this->valid()) {
                                              $this->logger->error(__METHOD__ . '(): No image loaded', ['app' => 'core']);
                                              return false;
                                          }
                                  Severity: Minor
                                  Found in lib/private/legacy/image.php - About 1 hr to fix

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

                                        private function analyzeOC(array $dependencies, array $appInfo) {
                                            $missing = [];
                                            $minVersion = null;
                                            if (isset($dependencies['owncloud']['@attributes']['min-version'])) {
                                                $minVersion = $dependencies['owncloud']['@attributes']['min-version'];
                                    Severity: Minor
                                    Found in lib/private/App/DependencyAnalyzer.php - About 1 hr to fix

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

                                          public static function rmdirr($dir, $deleteSelf = true) {
                                              if (\is_dir($dir)) {
                                                  $files = new RecursiveIteratorIterator(
                                                      new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS),
                                                      RecursiveIteratorIterator::CHILD_FIRST
                                      Severity: Minor
                                      Found in lib/private/legacy/helper.php - About 1 hr to fix

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

                                            public static function setStatus($status) {
                                                $protocol = \OC::$server->getRequest()->getHttpProtocol();
                                                switch ($status) {
                                                    case self::STATUS_NOT_MODIFIED:
                                                        $status = $status . ' Not Modified';
                                        Severity: Minor
                                        Found in lib/private/legacy/response.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language