owncloud/core

View on GitHub

Showing 3,235 of 4,504 total issues

Method moveFromCache has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath) {
        self::$path_cache->clear();
        if ($sourceCache instanceof Cache) {
            // normalize source and target
            $sourcePath = $this->normalize($sourcePath);
Severity: Minor
Found in lib/private/Files/Cache/Cache.php - About 1 hr to fix

    Method getAbsoluteMountPoints has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function getAbsoluteMountPoints($uid) {
            $mountPoints = [];
    
            $userGlobalStoragesService = \OC::$server->getUserGlobalStoragesService();
            '@phan-var \OC\Files\External\Service\UserGlobalStoragesService $userGlobalStoragesService';
    Severity: Minor
    Found in lib/private/Files/External/LegacyUtil.php - About 1 hr to fix

      Method extractMp4CoverArtwork has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function extractMp4CoverArtwork($absPath) {
              if (isset($this->noArtworkIndex[$absPath])) {
                  return false;
              }
      
      
      Severity: Minor
      Found in lib/private/Preview/Movie.php - About 1 hr to fix

        Method fixMarketAppState has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function fixMarketAppState(IOutput $output) {
                // no core update -> nothing to do
                if (!$this->isCoreUpdate()) {
                    return false;
                }
        Severity: Minor
        Found in lib/private/Repair/Apps.php - About 1 hr to fix

          Method unshareItem has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected static function unshareItem(array $item, $newParent = null) {
                  $shareType = (int)$item['share_type'];
                  $shareWith = null;
                  if ($shareType !== \OCP\Share::SHARE_TYPE_LINK) {
                      $shareWith = $item['share_with'];
          Severity: Minor
          Found in lib/private/Share/Share.php - About 1 hr to fix

            Method checkTags has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function checkTags($offset) {
                    $query = $this->connection->getQueryBuilder();
                    $query->select('uid')
                        ->from('vcategory')
                        ->groupBy('uid')
            Severity: Minor
            Found in lib/private/Repair/CleanTags.php - About 1 hr to fix

              Method transformDBResults has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private static function transformDBResults(&$row) {
                      if (isset($row['id'])) {
                          $row['id'] = (int) $row['id'];
                      }
                      if (isset($row['share_type'])) {
              Severity: Minor
              Found in lib/private/Share/Share.php - About 1 hr to fix

                Method getSharesWithInvalidFileid has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getSharesWithInvalidFileid(int $limit) {
                        $validShareTypes = [
                            \OCP\Share::SHARE_TYPE_USER,
                            \OCP\Share::SHARE_TYPE_GROUP,
                            \OCP\Share::SHARE_TYPE_LINK,
                Severity: Minor
                Found in lib/private/Share20/DefaultShareProvider.php - About 1 hr to fix

                  Method getSharedWithUserGroupQuery has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function getSharedWithUserGroupQuery($groups, $userId, $node) {
                          $qb = $this->dbConn->getQueryBuilder();
                          $qb->select('s.*', 'f.fileid', 'f.path')
                              ->selectAlias('st.id', 'storage_string_id')
                              ->from('share', 's')
                  Severity: Minor
                  Found in lib/private/Share20/DefaultShareProvider.php - About 1 hr to fix

                    Method getSettingsNavigation has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function getSettingsNavigation() {
                            $l = \OC::$server->getL10N('lib');
                            $urlGenerator = \OC::$server->getURLGenerator();
                    
                            $settings = [];
                    Severity: Minor
                    Found in lib/private/legacy/app.php - About 1 hr to fix

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

                          public function __construct(
                              $appName,
                              IDBConnection $connection,
                              IOutput $output = null,
                              AppLocator $appLocator = null,
                      Severity: Minor
                      Found in lib/private/DB/MigrationService.php - About 1 hr to fix

                        Method copyr has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public static function copyr($source, \OCP\Files\Folder $target) {
                                $dir = @\opendir($source);
                                if ($dir === false) {
                                    throw new NoReadAccessException('No read permission for folder ' . $source);
                                }
                        Severity: Minor
                        Found in lib/private/legacy/util.php - About 1 hr to fix

                          Method logClientIn has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function logClientIn($user, $password, IRequest $request) {
                                  $isTokenPassword = $this->isTokenPassword($password);
                                  if ($user === null || \trim($user) === '') {
                                      throw new \InvalidArgumentException('$user cannot be empty');
                                  }
                          Severity: Minor
                          Found in lib/private/User/Session.php - About 1 hr to fix

                            Method setReadMark has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function setReadMark($objectType, $objectId, \DateTime $dateTime, IUser $user) {
                                    $this->checkRoleParameters('Object', $objectType, $objectId);
                            
                                    $qb = $this->dbConn->getQueryBuilder();
                                    $values = [
                            Severity: Minor
                            Found in lib/private/Comments/Manager.php - About 1 hr to fix

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

                                  protected function execute(InputInterface $input, OutputInterface $output): int {
                                      $app = $input->getArgument('app');
                                      $noSensitiveValues = !$input->getOption('private');
                              
                                      switch ($app) {
                              Severity: Minor
                              Found in core/Command/Config/ListConfigs.php - About 1 hr to fix

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

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

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

                                      protected function configure() {
                                          parent::configure();
                                  
                                          $this->setName('encryption:decrypt-all');
                                          $this->setDescription('Disable server-side encryption and decrypt all files.');
                                  Severity: Minor
                                  Found in core/Command/Encryption/DecryptAll.php - About 1 hr to fix

                                    Method handleRepairFeedBack has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function handleRepairFeedBack($event) {
                                            if (!$event instanceof GenericEvent) {
                                                return;
                                            }
                                            switch ($event->getSubject()) {
                                    Severity: Minor
                                    Found in core/Command/Maintenance/Repair.php - About 1 hr to fix

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

                                          protected function configure() {
                                              $this
                                                  ->setName('user:resetpassword')
                                                  ->setDescription('Resets the password of the named user.')
                                                  ->addArgument(
                                      Severity: Minor
                                      Found in core/Command/User/ResetPassword.php - About 1 hr to fix

                                        Method writeArrayInOutputFormat has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            protected function writeArrayInOutputFormat(InputInterface $input, OutputInterface $output, $items, $prefix = self::DEFAULT_OUTPUT_PREFIX, $showIntKeys = false) {
                                                switch ($input->getOption('output')) {
                                                    case self::OUTPUT_FORMAT_JSON:
                                                        $output->writeln(\json_encode($items));
                                                        break;
                                        Severity: Minor
                                        Found in core/Command/Base.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language