owncloud/core

View on GitHub

Showing 3,235 of 4,503 total issues

File Manager.php has 385 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * @author Björn Schießle <bjoern@schiessle.org>
 * @author Joas Schilling <coding@schilljs.com>
 * @author Jörn Friedrich Dreyer <jfd@butonic.de>
Severity: Minor
Found in apps/files_sharing/lib/External/Manager.php - About 5 hrs to fix

    File Setup.php has 382 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * @author Administrator <Administrator@WINDOWS-2012>
     * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
     * @author Bart Visscher <bartv@thisnet.nl>
    Severity: Minor
    Found in lib/private/Setup.php - About 5 hrs to fix

      OC has 39 functions (exceeds 20 allowed). Consider refactoring.
      Open

      var OC = {
          PERMISSION_CREATE: 4,
          PERMISSION_READ: 1,
          PERMISSION_UPDATE: 2,
          PERMISSION_DELETE: 8,
      Severity: Minor
      Found in core/js/js.js - About 5 hrs to fix

        Encoding has 39 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class Encoding extends Wrapper {
            /**
             * @var CappedMemoryCache
             */
            private $namesCache;
        Severity: Minor
        Found in lib/private/Files/Storage/Wrapper/Encoding.php - About 5 hrs to fix

          Availability has 39 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class Availability extends Wrapper {
              public const RECHECK_TTL_SEC = 600; // 10 minutes
          
              public static function shouldRecheck($availability) {
                  if (!$availability['available']) {
          Severity: Minor
          Found in lib/private/Files/Storage/Wrapper/Availability.php - About 5 hrs to fix

            File sv.js has 381 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            OC.L10N.register(
                "core",
                {
                "Please select a file." : "Vänligen välj en fil.",
                "File is too big" : "Filen är för stor",
            Severity: Minor
            Found in core/l10n/sv.js - About 5 hrs to fix

              File en_GB.js has 381 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              OC.L10N.register(
                  "core",
                  {
                  "Please select a file." : "Please select a file.",
                  "File is too big" : "File is too big",
              Severity: Minor
              Found in core/l10n/en_GB.js - About 5 hrs to fix

                File pt_BR.js has 381 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                OC.L10N.register(
                    "core",
                    {
                    "Please select a file." : "Por favor selecione um arquivo.",
                    "File is too big" : "O arquivo é muito grande",
                Severity: Minor
                Found in core/l10n/pt_BR.js - About 5 hrs to fix

                  File ru.js has 381 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 de.js has 381 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 groß",
                    Severity: Minor
                    Found in core/l10n/de.js - About 5 hrs to fix

                      File sq.js has 381 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      OC.L10N.register(
                          "core",
                          {
                          "Please select a file." : "Ju lutemi, përzgjidhni një kartelë.",
                          "File is too big" : "Kartela është shumë e madhe",
                      Severity: Minor
                      Found in core/l10n/sq.js - About 5 hrs to fix

                        File de_DE.js has 381 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

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

                          File sharedfilelist.js has 380 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /*
                           * Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>
                           *
                           * This file is licensed under the Affero General Public License version 3
                           * or later.
                          Severity: Minor
                          Found in apps/files_sharing/js/sharedfilelist.js - About 5 hrs to fix

                            File tr.js has 380 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

                              File zh_CN.js has 379 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

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

                                    File es.js has 378 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
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language