owncloud/core

View on GitHub

Showing 3,236 of 4,502 total issues

Function rename has 144 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        rename: function(oldName) {
            var self = this;
            var tr, td, input, form;
            tr = this.findFileEl(oldName);
            var oldFileInfo = this.files[tr.index()];
Severity: Major
Found in apps/files/js/filelist.js - About 5 hrs to fix

    Function registerCoreProviders has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
    Open

        protected function registerCoreProviders() {
            if ($this->registeredCoreProviders) {
                return;
            }
            $this->registeredCoreProviders = true;
    Severity: Minor
    Found in lib/private/PreviewManager.php - About 5 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 ar.js has 404 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    OC.L10N.register(
        "settings",
        {
        "Wrong current password" : "كلمة المرور الحالية خاطئة",
        "The new password cannot be the same as the previous one" : "لا يمكن أن تكون كلمة المرور الجديدة نفس كلمة المرور القديمة",
    Severity: Minor
    Found in settings/l10n/ar.js - About 5 hrs to fix

      File bg_BG.js has 403 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      OC.L10N.register(
          "settings",
          {
          "Wrong current password" : "Грешна текуща парола",
          "The new password cannot be the same as the previous one" : "Новата парола не може да бъде същата като предишната.",
      Severity: Minor
      Found in settings/l10n/bg_BG.js - About 5 hrs to fix

        File ko.js has 403 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        OC.L10N.register(
            "settings",
            {
            "Wrong current password" : "현재 비밀번호가 잘못되었습니다",
            "The new password cannot be the same as the previous one" : "새 비밀번호는 이전 비밀번호와 같을 수 없습니다",
        Severity: Minor
        Found in settings/l10n/ko.js - About 5 hrs to fix

          File es.js has 403 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          OC.L10N.register(
              "settings",
              {
              "Wrong current password" : "Contraseña actual equivocada",
              "The new password cannot be the same as the previous one" : "La contraseña nueva no puede ser igual a la anterior",
          Severity: Minor
          Found in settings/l10n/es.js - About 5 hrs to fix

            FederatedShareProvider has 42 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class FederatedShareProvider implements IShareProvider {
                public const SHARE_TYPE_REMOTE = 6;
            
                /** @var IDBConnection */
                private $dbConnection;
            Severity: Minor
            Found in apps/federatedfilesharing/lib/FederatedShareProvider.php - About 5 hrs to fix

              File Scan.php has 401 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              /**
               * @author Bart Visscher <bartv@thisnet.nl>
               * @author Jörn Friedrich Dreyer <jfd@butonic.de>
               * @author martin.mattel@diemattels.at <martin.mattel@diemattels.at>
              Severity: Minor
              Found in apps/files/lib/Command/Scan.php - About 5 hrs to fix

                Method setupFS has 140 lines of code (exceeds 25 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: Major
                Found in lib/private/legacy/util.php - About 5 hrs to fix

                  Function createFileChunked has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private function createFileChunked($data) {
                          list($path, $name) = \Sabre\Uri\split($this->path);
                  
                          $info = \OC_FileChunking::decodeName($name);
                          if (empty($info)) {
                  Severity: Minor
                  Found in apps/dav/lib/Connector/Sabre/File.php - About 5 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 getFileInfo has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected function getFileInfo($path) {
                          $this->log('enter: '.__FUNCTION__."($path)");
                          $path = $this->buildPath($path);
                          if (!isset($this->statCache[$path])) {
                              try {
                  Severity: Minor
                  Found in apps/files_external/lib/Lib/Storage/SMB.php - About 5 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 execute has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected function execute(InputInterface $input, OutputInterface $output): int {
                          $appNameSubString = $input->getArgument('search-pattern');
                          $minimalView = $input->getOption('minimal');
                  
                          if ($input->getOption('shipped') === 'true' || $input->getOption('shipped') === 'false') {
                  Severity: Minor
                  Found in core/Command/App/ListApps.php - About 5 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 it.js has 399 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  OC.L10N.register(
                      "settings",
                      {
                      "Wrong current password" : "Password corrente errata",
                      "The new password cannot be the same as the previous one" : "La nuova password non può essere identica alla precedente",
                  Severity: Minor
                  Found in settings/l10n/it.js - About 5 hrs to fix

                    Function _createRow has 139 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            _createRow: function(fileData, options) {
                                var td, simpleSize, basename, extension, sizeColor,
                                    icon = fileData.icon || this._getIconUrl(fileData),
                                    name = fileData.name,
                                    // TODO: get rid of type, only use mime type
                    Severity: Major
                    Found in apps/files/js/filelist.js - About 5 hrs to fix

                      File zh_CN.js has 398 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      OC.L10N.register(
                          "settings",
                          {
                          "Wrong current password" : "密码错误",
                          "The new password cannot be the same as the previous one" : "新密码不能和之前的密码相同",
                      Severity: Minor
                      Found in settings/l10n/zh_CN.js - About 5 hrs to fix

                        File ru.js has 398 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        OC.L10N.register(
                            "settings",
                            {
                            "Wrong current password" : "Старый пароль неверен",
                            "The new password cannot be the same as the previous one" : "Новый пароль не совпадать с предыдущим",
                        Severity: Minor
                        Found in settings/l10n/ru.js - About 5 hrs to fix

                          File th_TH.js has 398 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          OC.L10N.register(
                              "settings",
                              {
                              "Wrong current password" : "รหัสผ่านปัจจุบันไม่ถูกต้อง",
                              "The new password cannot be the same as the previous one" : "รหัสผ่านใหม่ต้องไม่ซ้ำกับรหัสเดิมที่เคยใช้มาก่อน",
                          Severity: Minor
                          Found in settings/l10n/th_TH.js - About 5 hrs to fix

                            File el.js has 397 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            OC.L10N.register(
                                "settings",
                                {
                                "Wrong current password" : "Εσφαλμένο τρέχον συνθηματικό",
                                "The new password cannot be the same as the previous one" : "Το νέο συνθηματικό δεν πρέπει να είναι το ίδιο με το προηγούμενο",
                            Severity: Minor
                            Found in settings/l10n/el.js - About 5 hrs to fix

                              File helper.php has 397 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              <?php
                              /**
                               * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
                               * @author Bart Visscher <bartv@thisnet.nl>
                               * @author Björn Schießle <bjoern@schiessle.org>
                              Severity: Minor
                              Found in lib/private/legacy/helper.php - About 5 hrs to fix

                                Method put has 138 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function put($data) {
                                        try {
                                            $exists = $this->fileView->file_exists($this->path);
                                            if ($this->info && $exists && !$this->info->isUpdateable()) {
                                                throw new Forbidden();
                                Severity: Major
                                Found in apps/dav/lib/Connector/Sabre/File.php - About 5 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language