owncloud/core

View on GitHub

Showing 4,503 of 4,503 total issues

File Storage.php has 653 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: Major
Found in apps/files_versions/lib/Storage.php - About 1 day to fix

    File Encryption.php has 651 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 Lukas Reschke <lukas@statuscode.ch>
    Severity: Major
    Found in lib/private/Files/Storage/Wrapper/Encryption.php - About 1 day to fix

      File DAV.php has 650 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * @author Bart Visscher <bartv@thisnet.nl>
       * @author Björn Schießle <bjoern@schiessle.org>
       * @author Carlos Cerrillo <ccerrillo@gmail.com>
      Severity: Major
      Found in lib/private/Files/Storage/DAV.php - About 1 day to fix

        File shareitemmodel.js has 645 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         * Copyright (c) 2015
         *
         * This file is licensed under the Affero General Public License version 3
         * or later.
        Severity: Major
        Found in core/js/shareitemmodel.js - About 1 day to fix

          Method shareItem has 287 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function shareItem($itemType, $itemSource, $shareType, $shareWith, $permissions, $itemSourceName = null, \DateTime $expirationDate = null, $passwordChanged = null) {
                  $backend = self::getBackend($itemType);
                  $l = \OC::$server->getL10N('lib');
          
                  if ($backend->isShareTypeAllowed($shareType) === false) {
          Severity: Major
          Found in lib/private/Share/Share.php - About 1 day to fix

            Function fileexists has 280 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                fileexists:function(data, original, replacement, controller) {
                    var self = this;
                    var dialogDeferred = new $.Deferred();
            
                    var getCroppedPreview = function(file) {
            Severity: Major
            Found in core/js/oc-dialogs.js - About 1 day to fix

              File Cache.php has 627 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              /**
               * @author Andreas Fischer <bantu@owncloud.com>
               * @author Björn Schießle <bjoern@schiessle.org>
               * @author Florin Peter <github@florin-peter.de>
              Severity: Major
              Found in lib/private/Files/Cache/Cache.php - About 1 day to fix

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

                OC.L10N.register(
                    "files_external",
                    {
                    "Step 1 failed. Exception: %s" : "گام 1 ناموفق بود. خطا: %s",
                    "Step 2 failed. Exception: %s" : "گام ۲ شکست خورد. خطا: %s",
                Severity: Major
                Found in apps/files_external/l10n/fa.js and 2 other locations - About 1 day to fix
                apps/files_external/l10n/az.js on lines 1..52
                core/l10n/hi.js on lines 1..52

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

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

                OC.L10N.register(
                    "files_external",
                    {
                    "Step 1 failed. Exception: %s" : "1-ci addım səhv oldu. İstisna: %s",
                    "Step 2 failed. Exception: %s" : "2-ci addım. İstisna: %s",
                Severity: Major
                Found in apps/files_external/l10n/az.js and 2 other locations - About 1 day to fix
                apps/files_external/l10n/fa.js on lines 1..52
                core/l10n/hi.js on lines 1..52

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

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

                OC.L10N.register(
                    "core",
                    {
                    "Sunday" : "रविवार",
                    "Monday" : "सोमवार",
                Severity: Major
                Found in core/l10n/hi.js and 2 other locations - About 1 day to fix
                apps/files_external/l10n/az.js on lines 1..52
                apps/files_external/l10n/fa.js on lines 1..52

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

                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

                File Google.php has 612 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                /**
                 * @author Adam Williamson <awilliam@redhat.com>
                 * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
                 * @author Bart Visscher <bartv@thisnet.nl>
                Severity: Major
                Found in apps/files_external/lib/Lib/Storage/Google.php - About 1 day to fix

                  Function initCore has 267 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function initCore() {
                      // setup tooltip
                      $('.section .icon-info').tooltip({placement: 'right'});
                  
                      /**
                  Severity: Major
                  Found in core/js/js.js - About 1 day to fix

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

                    OC.L10N.register(
                        "files_sharing",
                        {
                        "Shared with you" : "Delt med deg",
                        "Shared with others" : "Delt med andre",
                    Severity: Major
                    Found in apps/files_sharing/l10n/nn_NO.js and 2 other locations - About 1 day to fix
                    apps/files_sharing/l10n/ca.js on lines 1..51
                    apps/files_sharing/l10n/sr@latin.js on lines 1..51

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

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

                    OC.L10N.register(
                        "files_sharing",
                        {
                        "Server to server sharing is not enabled on this server" : "La compartició entre servidors no està activada en aquest servidor",
                        "The mountpoint name contains invalid characters." : "El punt de muntatge conté caràcters invàlids.",
                    Severity: Major
                    Found in apps/files_sharing/l10n/ca.js and 2 other locations - About 1 day to fix
                    apps/files_sharing/l10n/nn_NO.js on lines 1..51
                    apps/files_sharing/l10n/sr@latin.js on lines 1..51

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

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

                    OC.L10N.register(
                        "files_sharing",
                        {
                        "Server to server sharing is not enabled on this server" : "Deljenje od servera do servera nije omogućeno na ovom serveru.",
                        "The mountpoint name contains invalid characters." : "Ime tačke za montiranje sadrži neispravne karaktere.",
                    Severity: Major
                    Found in apps/files_sharing/l10n/sr@latin.js and 2 other locations - About 1 day to fix
                    apps/files_sharing/l10n/ca.js on lines 1..51
                    apps/files_sharing/l10n/nn_NO.js on lines 1..51

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

                    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

                                    $(dialogId).on('click', '.original,.allexistingfiles', function(){
                                        var count = $(dialogId).find('.conflict .original input[type="checkbox"]:checked').length;
                                        if (count === $(dialogId+ ' .conflict').length) {
                                            $(dialogId).find('.allexistingfiles').prop('checked', true);
                                            $(dialogId).find('.allexistingfiles + .count').text(t('core','(all selected)'));
                    Severity: Major
                    Found in core/js/oc-dialogs.js and 1 other location - About 1 day to fix
                    core/js/oc-dialogs.js on lines 653..666

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

                    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

                                    $(dialogId).on('click', '.replacement,.allnewfiles', function() {
                                        var count = $(dialogId).find('.conflict .replacement input[type="checkbox"]:checked').length;
                                        if (count === $(dialogId+ ' .conflict').length) {
                                            $(dialogId).find('.allnewfiles').prop('checked', true);
                                            $(dialogId).find('.allnewfiles + .count').text(t('core','(all selected)'));
                    Severity: Major
                    Found in core/js/oc-dialogs.js and 1 other location - About 1 day to fix
                    core/js/oc-dialogs.js on lines 667..681

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

                    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

                    Filesystem has 71 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class Filesystem {
                        /**
                         * @var Mount\Manager $mounts
                         */
                        private static $mounts;
                    Severity: Major
                    Found in lib/private/Files/Filesystem.php - About 1 day to fix

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

                          public function __construct($appName, $urlParams = []) {
                              parent::__construct();
                              $this['AppName'] = $appName;
                              $this['urlParams'] = $urlParams;
                      
                      
                      Severity: Major
                      Found in lib/private/AppFramework/DependencyInjection/DIContainer.php - About 1 day to fix

                        File SMB.php has 600 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        /**
                         * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
                         * @author Jesús Macias <jmacias@solidgear.es>
                         * @author Jörn Friedrich Dreyer <jfd@butonic.de>
                        Severity: Major
                        Found in apps/files_external/lib/Lib/Storage/SMB.php - About 1 day to fix
                          Severity
                          Category
                          Status
                          Source
                          Language