owncloud/core

View on GitHub

Showing 4,504 of 4,504 total issues

Method __construct has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

        IDBConnection $connection,
        IL10N $l,
        IClientService $clientService,
        ILogger $logger,
        IJobList $jobList,
Severity: Major
Found in apps/federation/lib/Panels/Admin.php - About 1 hr to fix

    Method addShareToDB has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        private function addShareToDB($itemSource, $itemType, $shareWith, $sharedBy, $uidOwner, $permissions, $expiration, $token) {
    Severity: Major
    Found in apps/federatedfilesharing/lib/FederatedShareProvider.php - About 1 hr to fix

      Method __construct has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              IConfig $config,
              ILogger $logger,
              IDBConnection $databaseConnection,
              IUserSession $userSession,
              IMountManager $mountManager,
      Severity: Major
      Found in apps/dav/lib/Connector/Sabre/ServerFactory.php - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

                    if (\OC_User::handleApacheAuth() ||
                        //Fix for broken webdav clients
                        ($this->userSession->isLoggedIn() && $this->session->get(self::DAV_AUTHENTICATED) === null) ||
                        //Well behaved clients that only send the cookie are allowed
                        ($this->userSession->isLoggedIn() && $this->session->get(self::DAV_AUTHENTICATED) === $this->userSession->getUser()->getUID() && ($request->getHeader('Authorization') === null || $request->getHeader('Authorization') === ''))
        Severity: Major
        Found in apps/dav/lib/Connector/Sabre/Auth.php - About 1 hr to fix

          Method create has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  $mountPoint,
                  $backend,
                  $authMechanism,
                  $backendOptions,
                  $mountOptions,
          Severity: Major
          Found in apps/files_external/lib/Controller/GlobalStoragesController.php - About 1 hr to fix

            Method createStorage has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    $mountPoint,
                    $backend,
                    $authMechanism,
                    $backendOptions,
                    $mountOptions = null,
            Severity: Major
            Found in apps/files_external/lib/Controller/StoragesController.php - About 1 hr to fix

              Method __construct has 8 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      Tree $tree,
                      View $view,
                      ISystemTagManager $tagManager,
                      ISystemTagObjectMapper $tagMapper,
                      ITagManager $fileTagger,
              Severity: Major
              Found in apps/dav/lib/Connector/Sabre/FilesReportPlugin.php - About 1 hr to fix

                Method shareItem has 8 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public static function shareItem($itemType, $itemSource, $shareType, $shareWith, $permissions, $itemSourceName = null, \DateTime $expirationDate = null, $passwordChanged = null) {
                Severity: Major
                Found in lib/public/Share.php - About 1 hr to fix

                  Method createStorage has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          $mountPoint,
                          $backendIdentifier,
                          $authMechanismIdentifier,
                          $backendOptions,
                          $mountOptions = null,
                  Severity: Major
                  Found in lib/public/Files/External/Service/IStoragesService.php - About 1 hr to fix

                    Method register has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            $method,
                            $url,
                            $action,
                            $app,
                            $authLevel = self::USER_AUTH,
                    Severity: Major
                    Found in lib/public/API.php - About 1 hr to fix

                      Method createStorage has 8 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              $mountPoint,
                              $backendIdentifier,
                              $authMechanismIdentifier,
                              $backendOptions,
                              $mountOptions = null,
                      Severity: Major
                      Found in lib/private/Files/External/Service/StoragesService.php - About 1 hr to fix

                        Method checkReshare has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            private static function checkReshare($itemType, $itemSource, $shareType, $shareWith, $uidOwner, $permissions, $itemSourceName, $expirationDate) {
                        Severity: Major
                        Found in lib/private/Share/Share.php - About 1 hr to fix

                          Method shareItem has 8 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              public static function shareItem($itemType, $itemSource, $shareType, $shareWith, $permissions, $itemSourceName = null, \DateTime $expirationDate = null, $passwordChanged = null) {
                          Severity: Major
                          Found in lib/private/Share/Share.php - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                                    if ($dateInterval->y == 0 && $dateInterval->m == 0 && $dateInterval->d == 0) {
                                        return (string) $l->t('today');
                                    } elseif ($dateInterval->y == 0 && $dateInterval->m == 0 && $dateInterval->d == 1) {
                                        return (string) $l->t('yesterday');
                                    } elseif ($dateInterval->y == 0 && $dateInterval->m == 0) {
                            Severity: Major
                            Found in lib/private/DateTimeFormatter.php - About 1 hr to fix

                              Method register has 8 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      $method,
                                      $url,
                                      $action,
                                      $app,
                                      $authLevel = API::USER_AUTH,
                              Severity: Major
                              Found in lib/private/legacy/api.php - About 1 hr to fix

                                Method __construct has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        Account $account,
                                        AccountMapper $mapper,
                                        $emitter = null,
                                        IConfig $config = null,
                                        $urlGenerator = null,
                                Severity: Major
                                Found in lib/private/User/User.php - About 1 hr to fix

                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                          $qb = $qb->select('s.*')
                                              ->from('share', 's')
                                              ->leftJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid'))
                                              ->where($qb->expr()->isNull('f.fileid'))
                                              ->andWhere(
                                  Severity: Minor
                                  Found in apps/federatedfilesharing/lib/FederatedShareProvider.php and 1 other location - About 1 hr to fix
                                  lib/private/Share20/DefaultShareProvider.php on lines 973..983

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 100.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                  Open

                                      public function __construct(
                                          IManager $shareManager,
                                          IConfig $config,
                                          UserSearch $userSearch,
                                          IL10N $l10n,
                                  Severity: Major
                                  Found in apps/files_sharing/lib/Capabilities.php and 3 other locations - About 1 hr to fix
                                  apps/federatedfilesharing/lib/Notifications.php on lines 63..77
                                  lib/private/Authentication/TwoFactorAuth/Manager.php on lines 67..74
                                  lib/private/License/LicenseManager.php on lines 46..60

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 100.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                  Open

                                      public function __construct(
                                          LicenseFetcher $licenseFetcher,
                                          MessageService $messageService,
                                          IAppManager $appManager,
                                          IConfig $config,
                                  Severity: Major
                                  Found in lib/private/License/LicenseManager.php and 3 other locations - About 1 hr to fix
                                  apps/federatedfilesharing/lib/Notifications.php on lines 63..77
                                  apps/files_sharing/lib/Capabilities.php on lines 70..84
                                  lib/private/Authentication/TwoFactorAuth/Manager.php on lines 67..74

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 100.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Similar blocks of code found in 4 locations. Consider refactoring.
                                  Open

                                      public function __construct(
                                          AddressHandler $addressHandler,
                                          IClientService $httpClientService,
                                          DiscoveryManager $discoveryManager,
                                          NotificationManager $notificationManager,
                                  Severity: Major
                                  Found in apps/federatedfilesharing/lib/Notifications.php and 3 other locations - About 1 hr to fix
                                  apps/files_sharing/lib/Capabilities.php on lines 70..84
                                  lib/private/Authentication/TwoFactorAuth/Manager.php on lines 67..74
                                  lib/private/License/LicenseManager.php on lines 46..60

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 100.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language