owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

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

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

                          public function getFile($size) {
                              $ext = $this->getExtension();
                      
                              $basePath = "{$this->path}/avatar.$ext";
                      
                      
                      Severity: Minor
                      Found in lib/private/Avatar.php - About 1 hr to fix

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

                            protected function findMigrations() {
                                $directory = \realpath($this->migrationsPath);
                                $iterator = new \RegexIterator(
                                    new \RecursiveIteratorIterator(
                                        new \RecursiveDirectoryIterator($directory, \FilesystemIterator::SKIP_DOTS),
                        Severity: Minor
                        Found in lib/private/DB/MigrationService.php - About 1 hr to fix

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

                              public function setValues($table, array $keys, array $values, array $updatePreconditionValues = []) {
                                  // Try to insert whole record into the table ($toInsert) if predicate NOT EXISTS ($compare) is satisfied
                                  $toInsert = \array_merge($keys, $values);
                                  $compare = \array_keys($keys);
                                  $tableName = $this->tablePrefix . $table;
                          Severity: Minor
                          Found in lib/private/DB/Connection.php - About 1 hr to fix

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

                                private function processLines(array $params, array &$data) {
                                    static $lastProcessedChar = null;
                            
                                    if (!isset($data['linesNumber'])) {
                                        $data = [
                            Severity: Minor
                            Found in lib/private/Utf8Analyzer.php - About 1 hr to fix

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

                                  public function loginWithCookie($uid, $currentToken) {
                                      $this->logger->debug(
                                          'regenerating session id for uid {uid}, currentToken {currentToken}',
                                          ['app' => __METHOD__, 'uid' => $uid, 'currentToken' => $currentToken]
                                      );
                              Severity: Minor
                              Found in lib/private/User/Session.php - About 1 hr to fix

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

                                    public function getNumberOfUnreadCommentsForNodes($objectType, $objectIds, IUser $user) {
                                        $qbMain = $this->dbConn->getQueryBuilder();
                                        $qbSup = $this->dbConn->getQueryBuilder();
                                
                                        $unreadCountsForNodes = [];
                                Severity: Minor
                                Found in lib/private/Comments/Manager.php - About 1 hr to fix

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

                                      public function getTree($id, $limit = 0, $offset = 0) {
                                          $tree = [];
                                          $tree['comment'] = $this->get($id);
                                          $tree['replies'] = [];
                                  
                                  
                                  Severity: Minor
                                  Found in lib/private/Comments/Manager.php - About 1 hr to fix

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

                                        protected function execute(InputInterface $input, OutputInterface $output): int {
                                            // validate the environment
                                            $server = \OC::$server;
                                            $setupHelper = new Setup(
                                                $this->config,
                                    Severity: Minor
                                    Found in core/Command/Maintenance/Install.php - About 1 hr to fix

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

                                          protected function execute(InputInterface $input, OutputInterface $output): int {
                                              $configNames = $input->getArgument('name');
                                              $configName = $configNames[0];
                                      
                                              if (\sizeof($configNames) > 1) {
                                      Severity: Minor
                                      Found in core/Command/Config/System/DeleteConfig.php - About 1 hr to fix

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

                                            protected function execute(InputInterface $input, OutputInterface $output): int {
                                                '@phan-var \OC\Files\MimetypeDetector $this->mimetypeDetector';
                                                $mappings = $this->mimetypeDetector->getAllMappings();
                                        
                                                $totalFilecacheUpdates = 0;
                                        Severity: Minor
                                        Found in core/Command/Maintenance/Mimetype/UpdateDB.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language