owncloud/core

View on GitHub

Showing 3,235 of 4,503 total issues

Function decryptUsersFiles has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

    protected function decryptUsersFiles($uid, ProgressBar $progress, $userCount) {
        $this->setupUserFS($uid);
        $directories = [];
        $directories[] = '/' . $uid . '/files';

Severity: Minor
Found in lib/private/Encryption/DecryptAll.php - About 4 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

File SyncBackend.php has 364 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * @author Jörn Friedrich Dreyer <jfd@butonic.de>
 * @author Thomas Müller <thomas.mueller@tmit.eu>
 *
Severity: Minor
Found in core/Command/User/SyncBackend.php - About 4 hrs to fix

    File nb_NO.js has 363 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    OC.L10N.register(
        "settings",
        {
        "Wrong current password" : "Feil nåværende passord",
        "The new password cannot be the same as the previous one" : "Det nye passordet kan ikke være det samme som det forrige",
    Severity: Minor
    Found in settings/l10n/nb_NO.js - About 4 hrs to fix

      File gl.js has 363 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      OC.L10N.register(
          "core",
          {
          "Please select a file." : "Seleccione un ficheiro.",
          "File is too big" : "O ficheiro é grande de máis",
      Severity: Minor
      Found in core/l10n/gl.js - About 4 hrs to fix

        File he.js has 363 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        OC.L10N.register(
            "core",
            {
            "Please select a file." : "יש לבחור קובץ.",
            "File is too big" : "הקובץ גדול מדי",
        Severity: Minor
        Found in core/l10n/he.js - About 4 hrs to fix

          File zh_TW.js has 363 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          OC.L10N.register(
              "core",
              {
              "Please select a file." : "請選擇一個檔案",
              "File is too big" : "檔案太大",
          Severity: Minor
          Found in core/l10n/zh_TW.js - About 4 hrs to fix

            File StoragesService.php has 363 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * @author Jesús Macias <jmacias@solidgear.es>
             * @author Lukas Reschke <lukas@statuscode.ch>
             * @author Robin Appelman <icewind@owncloud.com>
            Severity: Minor
            Found in lib/private/Files/External/Service/StoragesService.php - About 4 hrs to fix

              File ar.js has 362 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              OC.L10N.register(
                  "core",
                  {
                  "Please select a file." : "يُرجى تحديد ملف.",
                  "File is too big" : "الملف كبير للغاية",
              Severity: Minor
              Found in core/l10n/ar.js - About 4 hrs to fix

                SharedStorage has 36 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedStorage {
                    /** @var \OCP\Share\IShare */
                    private $superShare;
                
                    /** @var \OCP\Share\IShare[] */
                Severity: Minor
                Found in apps/files_sharing/lib/SharedStorage.php - About 4 hrs to fix

                  DAV has 36 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class DAV extends Common {
                      /** @var string */
                      protected $password;
                      /** @var string */
                      protected $user;
                  Severity: Minor
                  Found in lib/private/Files/Storage/DAV.php - About 4 hrs to fix

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

                        public function __construct() {
                            parent::__construct('federatedfilesharing');
                            $container = $this->getContainer();
                            $server = $container->getServer();
                    
                    
                    Severity: Major
                    Found in apps/federatedfilesharing/lib/AppInfo/Application.php - About 4 hrs to fix

                      Method log has 115 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function log($level, $message, array $context = []) {
                              $minLevel = \min($this->config->getValue('loglevel', Util::WARN), Util::FATAL);
                              $logConditions = $this->config->getValue('log.conditions', []);
                              if (empty($logConditions)) {
                                  $logConditions[] = $this->config->getValue('log.condition', []);
                      Severity: Major
                      Found in lib/private/Log.php - About 4 hrs to fix

                        File cs_CZ.js has 358 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        OC.L10N.register(
                            "settings",
                            {
                            "Wrong current password" : "Chybné heslo",
                            "The new password cannot be the same as the previous one" : "Nové heslo nemůže být stejné jako to předchozí",
                        Severity: Minor
                        Found in settings/l10n/cs_CZ.js - About 4 hrs to fix

                          File RepairMismatchFileCachePath.php has 358 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          /**
                           * @author Vincent Petry <pvince81@owncloud.com>
                           *
                           * @copyright Copyright (c) 2018, ownCloud GmbH
                          Severity: Minor
                          Found in lib/private/Repair/RepairMismatchFileCachePath.php - About 4 hrs to fix

                            Function downloadShare has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function downloadShare($token, $files = null, $path = '', $downloadStartSecret = '') {
                                    \OC_User::setIncognitoMode(true);
                            
                                    $share = $this->shareManager->getShareByToken($token);
                            
                            
                            Severity: Minor
                            Found in apps/files_sharing/lib/Controllers/ShareController.php - About 4 hrs to fix

                            Cognitive Complexity

                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                            A method's cognitive complexity is based on a few simple rules:

                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                            • Code is considered more complex for each "break in the linear flow of the code"
                            • Code is considered more complex when "flow breaking structures are nested"

                            Further reading

                            Function moveInto has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function moveInto($targetName, $fullSourcePath, INode $sourceNode) {
                                    if (!$sourceNode instanceof Node) {
                                        if ($sourceNode instanceof ITrashBinNode) {
                                            if (!$this->fileView->isCreatable($this->getPath())) {
                                                throw new SabreForbidden('Destination directory is not writable');
                            Severity: Minor
                            Found in apps/dav/lib/Connector/Sabre/Directory.php - About 4 hrs to fix

                            Cognitive Complexity

                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                            A method's cognitive complexity is based on a few simple rules:

                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                            • Code is considered more complex for each "break in the linear flow of the code"
                            • Code is considered more complex when "flow breaking structures are nested"

                            Further reading

                            Function setupFS has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public static function setupFS($user = '', $fullInit = true) {
                                    //setting up the filesystem twice can only lead to trouble
                                    if (self::$fsSetup) {
                                        return false;
                                    }
                            Severity: Minor
                            Found in lib/private/legacy/util.php - About 4 hrs to fix

                            Cognitive Complexity

                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                            A method's cognitive complexity is based on a few simple rules:

                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                            • Code is considered more complex for each "break in the linear flow of the code"
                            • Code is considered more complex when "flow breaking structures are nested"

                            Further reading

                            Function showLoginForm has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function showLoginForm($user, $redirect_url, $remember_login) {
                                    // check if there is apache auth backend available and try to obtain session,
                                    // if apache backend not registered or failed to login, proceed with show login form
                                    if ($this->handleApacheAuth()) {
                                        // apache auth was completed server-side and there is active session,
                            Severity: Minor
                            Found in core/Controller/LoginController.php - About 4 hrs to fix

                            Cognitive Complexity

                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                            A method's cognitive complexity is based on a few simple rules:

                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                            • Code is considered more complex for each "break in the linear flow of the code"
                            • Code is considered more complex when "flow breaking structures are nested"

                            Further reading

                            File pl.js has 357 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            OC.L10N.register(
                                "core",
                                {
                                "Please select a file." : "Proszę wybrać plik",
                                "File is too big" : "Plik jest za duży",
                            Severity: Minor
                            Found in core/l10n/pl.js - About 4 hrs to fix

                              File cs_CZ.js has 357 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              OC.L10N.register(
                                  "core",
                                  {
                                  "Please select a file." : "Prosím vyberte soubor.",
                                  "File is too big" : "Soubor je příliš velký",
                              Severity: Minor
                              Found in core/l10n/cs_CZ.js - About 4 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language