owncloud/core

View on GitHub

Showing 4,504 of 4,504 total issues

File ru.js has 380 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/ru.js - About 5 hrs to fix

    File tr.js has 379 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    OC.L10N.register(
        "core",
        {
        "Please select a file." : "Lütfen bir dosya seçin.",
        "File is too big" : "Dosya çok büyük",
    Severity: Minor
    Found in core/l10n/tr.js - About 5 hrs to fix

      Function getFileInfo has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
      Open

          public function getFileInfo($path, $includeMountPoints = true) {
              $this->assertPathLength($path);
              if (!Filesystem::isValidPath($path)) {
                  return false;
              }
      Severity: Minor
      Found in lib/private/Files/View.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 validatePermissions has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
      Open

          protected function validatePermissions(IShare $share) {
              // Permissions should be set
              if ($share->getPermissions() === null) {
                  throw new \InvalidArgumentException('A share requires permissions');
              }
      Severity: Minor
      Found in lib/private/Share20/Manager.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 fr.js has 378 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      OC.L10N.register(
          "settings",
          {
          "Wrong current password" : "Mot de passe actuel incorrect",
          "The new password cannot be the same as the previous one" : "Le nouveau mot de passe ne peut pas être le même que l'ancien",
      Severity: Minor
      Found in settings/l10n/fr.js - About 5 hrs to fix

        File zh_CN.js has 378 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_CN.js - About 5 hrs to fix

          File bg_BG.js has 377 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/bg_BG.js - About 5 hrs to fix

            File de_CH.js has 377 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            OC.L10N.register(
                "core",
                {
                "Please select a file." : "Bitte wähle eine Datei aus.",
                "File is too big" : "Datei ist zu gross",
            Severity: Minor
            Found in core/l10n/de_CH.js - About 5 hrs to fix

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

              OC.L10N.register(
                  "core",
                  {
                  "Please select a file." : "Seleccione un archivo, por favor.",
                  "File is too big" : "El archivo es demasiado grande",
              Severity: Minor
              Found in core/l10n/es.js - About 5 hrs to fix

                File it.js has 377 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                OC.L10N.register(
                    "core",
                    {
                    "Please select a file." : "Seleziona un file.",
                    "File is too big" : "Il file è troppo grande",
                Severity: Minor
                Found in core/l10n/it.js - About 5 hrs to fix

                  File ug.js has 375 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/ug.js - About 5 hrs to fix

                    File fa.js has 375 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/fa.js - About 5 hrs to fix

                      CalDavBackend has 38 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class CalDavBackend extends AbstractBackend implements SyncSupport, SubscriptionSupport, SchedulingSupport {
                          /**
                           * We need to specify a max date, because we need to stop *somewhere*
                           *
                           * On 32 bit system the maximum for a signed integer is 2147483647, so
                      Severity: Minor
                      Found in apps/dav/lib/CalDAV/CalDavBackend.php - About 5 hrs to fix

                        File es_AR.js has 374 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

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

                          File fr.js has 374 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          OC.L10N.register(
                              "core",
                              {
                              "Please select a file." : "Veuillez sélectionner un fichier.",
                              "File is too big" : "Fichier trop volumineux",
                          Severity: Minor
                          Found in core/l10n/fr.js - About 5 hrs to fix

                            File User.php has 373 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/User/User.php - About 4 hrs to fix

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

                                      try {
                                          $result = $this->httpClient->post(
                                              $target . $this->endPoint,
                                              [
                                                  'form_params' => [
                              Severity: Major
                              Found in apps/federation/lib/BackgroundJob/RequestSharedSecret.php and 1 other location - About 4 hrs to fix
                              apps/federation/lib/BackgroundJob/GetSharedSecret.php on lines 142..167

                              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 182.

                              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 2 locations. Consider refactoring.
                              Open

                                      try {
                                          $result = $this->httpClient->get(
                                              $target . $this->endPoint,
                                              [
                                                  'query' => [
                              Severity: Major
                              Found in apps/federation/lib/BackgroundJob/GetSharedSecret.php and 1 other location - About 4 hrs to fix
                              apps/federation/lib/BackgroundJob/RequestSharedSecret.php on lines 139..164

                              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 182.

                              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

                              Function initPaths has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public static function initPaths() {
                                      if (\defined('PHPUNIT_CONFIG_DIR')) {
                                          self::$configDir = OC::$SERVERROOT . '/' . PHPUNIT_CONFIG_DIR . '/';
                                      } elseif (\defined('PHPUNIT_RUN') and PHPUNIT_RUN and \is_dir(OC::$SERVERROOT . '/tests/config/')) {
                                          self::$configDir = OC::$SERVERROOT . '/tests/config/';
                              Severity: Minor
                              Found in lib/kernel.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 transferShare has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function transferShare(IShare $share, $oldOwner, $newOwner, $finalTarget, $isChild = null) {
                                      if ($this->userManager->get($oldOwner) === null) {
                                          throw new TransferSharesException("The current owner of the share $oldOwner doesn't exist");
                                      }
                                      if ($this->userManager->get($newOwner) === null) {
                              Severity: Minor
                              Found in lib/private/Share20/Manager.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

                              Severity
                              Category
                              Status
                              Source
                              Language