owncloud/core

View on GitHub

Showing 4,504 of 4,504 total issues

Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

        IConfig $config,
        IDBConnection $connection,
        IUserManager $userManager,
        IAvatarManager $avatarManager,
        IRootFolder $rootFolder,
Severity: Major
Found in lib/private/Repair/MoveAvatarIntoSubFolder.php - About 50 mins to fix

    Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            IConfig $config,
            IDBConnection $connection,
            IUserManager $userManager,
            IAvatarManager $avatarManager,
            IRootFolder $rootFolder,
    Severity: Major
    Found in lib/private/Repair/MoveAvatarOutsideHome.php - About 50 mins to fix

      Method generateTarget has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public static function generateTarget($itemType, $itemSource, $shareType, $shareWith, $uidOwner, $suggestedTarget = null, $groupParent = null) {
      Severity: Major
      Found in lib/private/Share/Helper.php - About 50 mins to fix

        Method deleteOrphanEntries has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            protected function deleteOrphanEntries(IOutput $output, $repairInfo, $deleteTable, $deleteId, $sourceTable, $sourceId, $sourceNullColumn) {
        Severity: Major
        Found in lib/private/Repair/CleanTags.php - About 50 mins to fix

          Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  $user = '',
                  $root = '/',
                  Node $file = null,
                  $maxX = 1,
                  $maxY = 1,
          Severity: Major
          Found in lib/private/Preview.php - About 50 mins to fix

            Method setCookie has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function setCookie($name, $value, $expire, $path, $domain, $secure, $httpOnly) {
            Severity: Major
            Found in lib/private/AppFramework/Http/Output.php - About 50 mins to fix

              Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      $appName,
                      IRequest $request,
                      IAppManager $appManager,
                      IRootFolder $rootFolder,
                      IURLGenerator $generator,
              Severity: Major
              Found in core/Controller/AppRegistryController.php - About 50 mins to fix

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

                        if (storageConfig.applicableUsers) {
                            applicable = applicable.concat(
                                _.map(storageConfig.applicableUsers, function(user) {
                                    return 'u:'+user;
                                })
                Severity: Minor
                Found in apps/files_external/js/settings.js and 1 other location - About 50 mins to fix
                apps/files_external/js/settings.js on lines 978..984

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

                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

                $(document).ready(function() {
                    $('form[name=login]').submit(OC.Login.onLogin);
                
                    $('#remember_login').click(OC.Login.rememberLogin);
                    
                Severity: Minor
                Found in core/js/login.js and 1 other location - About 50 mins to fix
                core/js/lostpassword.js on lines 14..17

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

                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

                    init : function() {
                        $('#lost-password').click(OC.Lostpassword.resetLink);
                        $('#reset-password #submit').click(OC.Lostpassword.resetPassword);
                    },
                Severity: Minor
                Found in core/js/lostpassword.js and 1 other location - About 50 mins to fix
                core/js/login.js on lines 31..36

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

                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

                        if (storageConfig.applicableGroups) {
                            applicable = applicable.concat(
                                _.map(storageConfig.applicableGroups, function(group) {
                                    return 'g:'+group;
                                })
                Severity: Minor
                Found in apps/files_external/js/settings.js and 1 other location - About 50 mins to fix
                apps/files_external/js/settings.js on lines 971..977

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

                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

                <?php
                /**
                 * @author Jörn Friedrich Dreyer <jfd@butonic.de>
                 *
                 * @copyright Copyright (c) 2018, ownCloud GmbH
                Severity: Minor
                Found in apps/files_sharing/appinfo/Migrations/Version20171115154900.php and 1 other location - About 50 mins to fix
                apps/files_sharing/appinfo/Migrations/Version20170830112305.php on lines 1..39

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

                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

                <?php
                /**
                 * @author Jörn Friedrich Dreyer <jfd@butonic.de>
                 *
                 * @copyright Copyright (c) 2018, ownCloud GmbH
                Severity: Minor
                Found in apps/files_sharing/appinfo/Migrations/Version20170830112305.php and 1 other location - About 50 mins to fix
                apps/files_sharing/appinfo/Migrations/Version20171115154900.php on lines 1..39

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

                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

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

                        submit: function (e, data) {
                            data.formData = _.extend(data.formData || {}, {
                                requesttoken: OC.requestToken
                            });
                        },
                Severity: Minor
                Found in settings/js/certificates.js and 1 other location - About 50 mins to fix
                settings/js/panels/profile.js on lines 241..245

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

                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

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

                        submit: function(e, data) {
                            data.formData = _.extend(data.formData || {}, {
                                requesttoken: OC.requestToken
                            });
                        },
                Severity: Minor
                Found in settings/js/panels/profile.js and 1 other location - About 50 mins to fix
                settings/js/certificates.js on lines 20..24

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

                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

                                if (_.isFunction(actionSpec.iconClass)) {
                                    params.iconClass = actionSpec.iconClass(context.$file.attr('data-file'), context);
                                }
                Severity: Minor
                Found in apps/files/js/fileactions.js and 1 other location - About 50 mins to fix
                apps/files/js/fileactions.js on lines 359..361

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

                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

                    enforce2faGroupsList.change(function(ev) {
                        OC.AppConfig.setValue('core', 'enforce_2fa_excluded_groups', JSON.stringify(ev.val || []));
                    });
                Severity: Minor
                Found in settings/js/panels/enforce2fa.js and 1 other location - About 50 mins to fix
                settings/js/panels/persistentlocking.js on lines 5..7

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

                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

                                    click        : function () {
                                        if (callback !== undefined) {
                                            callback(true, input.val());
                                        }
                                        $(dialogId).ocdialog('close');
                Severity: Minor
                Found in core/js/oc-dialogs.js and 1 other location - About 50 mins to fix
                core/js/oc-dialogs.js on lines 112..117

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

                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

                        nextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText,
                            this._daylightSavingAdjust( new Date( drawYear, drawMonth + stepMonths, 1 ) ),
                            this._getFormatConfig( inst ) ) );
                Severity: Minor
                Found in core/js/js.js and 1 other location - About 50 mins to fix
                core/js/js.js on lines 2956..2958

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

                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

                            if (this.$filePicker.data('mimetype') === "httpd/unix-directory") {
                                buttonEnableDisable.prop("disabled", false);
                            } else {
                                buttonEnableDisable.prop("disabled", true);
                            }
                Severity: Minor
                Found in core/js/oc-dialogs.js and 1 other location - About 50 mins to fix
                core/js/oc-dialogs.js on lines 845..849

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

                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

                Severity
                Category
                Status
                Source
                Language