owncloud/core

View on GitHub

Showing 1,269 of 4,504 total issues

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

OC.L10N.register(
    "systemtags",
    {
    "Tags" : "Etiquetas",
    "Tagged files" : "Archivos etiquetados",
Severity: Major
Found in apps/systemtags/l10n/es_MX.js and 16 other locations - About 1 hr to fix
apps/comments/l10n/az.js on lines 1..14
apps/federation/l10n/sk_SK.js on lines 1..14
apps/files_external/l10n/ur_PK.js on lines 1..14
apps/files_sharing/l10n/kn.js on lines 1..14
apps/files_sharing/l10n/ta.js on lines 1..14
apps/files_trashbin/l10n/bn_BD.js on lines 1..14
apps/files_trashbin/l10n/cy_GB.js on lines 1..14
apps/files_trashbin/l10n/ka_GE.js on lines 1..14
apps/files_trashbin/l10n/ms_MY.js on lines 1..14
apps/files_trashbin/l10n/ur_PK.js on lines 1..14
apps/updatenotification/l10n/ro.js on lines 1..14
apps/updatenotification/l10n/sr.js on lines 1..14
lib/l10n/ku_IQ.js on lines 1..14
lib/l10n/ms_MY.js on lines 1..14
lib/l10n/te.js on lines 1..14
settings/l10n/bn_IN.js on lines 1..14

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

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

OC.L10N.register(
    "updatenotification",
    {
    "{version} is available. Get more information on how to update." : "{version} este disponibil. Află mai multe informații despre cum să faci o actualizare.",
    "Updated channel" : "Canal actualizat",
Severity: Major
Found in apps/updatenotification/l10n/ro.js and 16 other locations - About 1 hr to fix
apps/comments/l10n/az.js on lines 1..14
apps/federation/l10n/sk_SK.js on lines 1..14
apps/files_external/l10n/ur_PK.js on lines 1..14
apps/files_sharing/l10n/kn.js on lines 1..14
apps/files_sharing/l10n/ta.js on lines 1..14
apps/files_trashbin/l10n/bn_BD.js on lines 1..14
apps/files_trashbin/l10n/cy_GB.js on lines 1..14
apps/files_trashbin/l10n/ka_GE.js on lines 1..14
apps/files_trashbin/l10n/ms_MY.js on lines 1..14
apps/files_trashbin/l10n/ur_PK.js on lines 1..14
apps/systemtags/l10n/es_MX.js on lines 1..14
apps/updatenotification/l10n/sr.js on lines 1..14
lib/l10n/ku_IQ.js on lines 1..14
lib/l10n/ms_MY.js on lines 1..14
lib/l10n/te.js on lines 1..14
settings/l10n/bn_IN.js on lines 1..14

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

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

OC.L10N.register(
    "lib",
    {
    "today" : "ఈరోజు",
    "yesterday" : "నిన్న",
Severity: Major
Found in lib/l10n/te.js and 16 other locations - About 1 hr to fix
apps/comments/l10n/az.js on lines 1..14
apps/federation/l10n/sk_SK.js on lines 1..14
apps/files_external/l10n/ur_PK.js on lines 1..14
apps/files_sharing/l10n/kn.js on lines 1..14
apps/files_sharing/l10n/ta.js on lines 1..14
apps/files_trashbin/l10n/bn_BD.js on lines 1..14
apps/files_trashbin/l10n/cy_GB.js on lines 1..14
apps/files_trashbin/l10n/ka_GE.js on lines 1..14
apps/files_trashbin/l10n/ms_MY.js on lines 1..14
apps/files_trashbin/l10n/ur_PK.js on lines 1..14
apps/systemtags/l10n/es_MX.js on lines 1..14
apps/updatenotification/l10n/ro.js on lines 1..14
apps/updatenotification/l10n/sr.js on lines 1..14
lib/l10n/ku_IQ.js on lines 1..14
lib/l10n/ms_MY.js on lines 1..14
settings/l10n/bn_IN.js on lines 1..14

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

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

OC.L10N.register(
    "lib",
    {
    "Username" : "Nama pengguna",
    "Password" : "Kata laluan",
Severity: Major
Found in lib/l10n/ms_MY.js and 16 other locations - About 1 hr to fix
apps/comments/l10n/az.js on lines 1..14
apps/federation/l10n/sk_SK.js on lines 1..14
apps/files_external/l10n/ur_PK.js on lines 1..14
apps/files_sharing/l10n/kn.js on lines 1..14
apps/files_sharing/l10n/ta.js on lines 1..14
apps/files_trashbin/l10n/bn_BD.js on lines 1..14
apps/files_trashbin/l10n/cy_GB.js on lines 1..14
apps/files_trashbin/l10n/ka_GE.js on lines 1..14
apps/files_trashbin/l10n/ms_MY.js on lines 1..14
apps/files_trashbin/l10n/ur_PK.js on lines 1..14
apps/systemtags/l10n/es_MX.js on lines 1..14
apps/updatenotification/l10n/ro.js on lines 1..14
apps/updatenotification/l10n/sr.js on lines 1..14
lib/l10n/ku_IQ.js on lines 1..14
lib/l10n/te.js on lines 1..14
settings/l10n/bn_IN.js on lines 1..14

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

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

OC.L10N.register(
    "federation",
    {
    "Server added to the list of trusted ownClouds" : "Server pridaný k dôveryhodným ownCloud-om",
    "Server is already in the list of trusted servers." : "Server sa už nachádza v zozname dôveryhodných serverov.",
Severity: Major
Found in apps/federation/l10n/sk_SK.js and 16 other locations - About 1 hr to fix
apps/comments/l10n/az.js on lines 1..14
apps/files_external/l10n/ur_PK.js on lines 1..14
apps/files_sharing/l10n/kn.js on lines 1..14
apps/files_sharing/l10n/ta.js on lines 1..14
apps/files_trashbin/l10n/bn_BD.js on lines 1..14
apps/files_trashbin/l10n/cy_GB.js on lines 1..14
apps/files_trashbin/l10n/ka_GE.js on lines 1..14
apps/files_trashbin/l10n/ms_MY.js on lines 1..14
apps/files_trashbin/l10n/ur_PK.js on lines 1..14
apps/systemtags/l10n/es_MX.js on lines 1..14
apps/updatenotification/l10n/ro.js on lines 1..14
apps/updatenotification/l10n/sr.js on lines 1..14
lib/l10n/ku_IQ.js on lines 1..14
lib/l10n/ms_MY.js on lines 1..14
lib/l10n/te.js on lines 1..14
settings/l10n/bn_IN.js on lines 1..14

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

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

OC.L10N.register(
    "files_trashbin",
    {
    "Couldn't delete %s permanently" : "Tidak dapat menghapuskan %s secara kekal",
    "Couldn't restore %s" : "Tidak dapat memulihkan %s",
Severity: Major
Found in apps/files_trashbin/l10n/ms_MY.js and 16 other locations - About 1 hr to fix
apps/comments/l10n/az.js on lines 1..14
apps/federation/l10n/sk_SK.js on lines 1..14
apps/files_external/l10n/ur_PK.js on lines 1..14
apps/files_sharing/l10n/kn.js on lines 1..14
apps/files_sharing/l10n/ta.js on lines 1..14
apps/files_trashbin/l10n/bn_BD.js on lines 1..14
apps/files_trashbin/l10n/cy_GB.js on lines 1..14
apps/files_trashbin/l10n/ka_GE.js on lines 1..14
apps/files_trashbin/l10n/ur_PK.js on lines 1..14
apps/systemtags/l10n/es_MX.js on lines 1..14
apps/updatenotification/l10n/ro.js on lines 1..14
apps/updatenotification/l10n/sr.js on lines 1..14
lib/l10n/ku_IQ.js on lines 1..14
lib/l10n/ms_MY.js on lines 1..14
lib/l10n/te.js on lines 1..14
settings/l10n/bn_IN.js on lines 1..14

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

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

OC.L10N.register(
    "files_trashbin",
    {
    "Couldn't delete %s permanently" : "Methwyd dileu %s yn barhaol",
    "Couldn't restore %s" : "Methwyd adfer %s",
Severity: Major
Found in apps/files_trashbin/l10n/cy_GB.js and 16 other locations - About 1 hr to fix
apps/comments/l10n/az.js on lines 1..14
apps/federation/l10n/sk_SK.js on lines 1..14
apps/files_external/l10n/ur_PK.js on lines 1..14
apps/files_sharing/l10n/kn.js on lines 1..14
apps/files_sharing/l10n/ta.js on lines 1..14
apps/files_trashbin/l10n/bn_BD.js on lines 1..14
apps/files_trashbin/l10n/ka_GE.js on lines 1..14
apps/files_trashbin/l10n/ms_MY.js on lines 1..14
apps/files_trashbin/l10n/ur_PK.js on lines 1..14
apps/systemtags/l10n/es_MX.js on lines 1..14
apps/updatenotification/l10n/ro.js on lines 1..14
apps/updatenotification/l10n/sr.js on lines 1..14
lib/l10n/ku_IQ.js on lines 1..14
lib/l10n/ms_MY.js on lines 1..14
lib/l10n/te.js on lines 1..14
settings/l10n/bn_IN.js on lines 1..14

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

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

            config.append($(document.createElement('input'))
                .addClass('button auth-param')
                .attr('type', 'button')
                .attr('value', t('files_external', 'Grant access'))
                .attr('name', 'oauth2_grant')
Severity: Major
Found in apps/files_external/js/oauth2.js and 1 other location - About 1 hr to fix
apps/files_external/js/oauth1.js on lines 10..15

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

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

            config.append($(document.createElement('input'))
                .addClass('button auth-param')
                .attr('type', 'button')
                .attr('value', t('files_external', 'Grant access'))
                .attr('name', 'oauth1_grant')
Severity: Major
Found in apps/files_external/js/oauth1.js and 1 other location - About 1 hr to fix
apps/files_external/js/oauth2.js on lines 10..15

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

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

        getAjaxUrl: function(action, params) {
            var q = '';
            if (params) {
                q = '?' + OC.buildQueryString(params);
            }
Severity: Major
Found in apps/files_trashbin/js/filelist.js and 1 other location - About 1 hr to fix
apps/files/js/files.js on lines 198..204

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

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

        getAjaxUrl: function(action, params) {
            var q = '';
            if (params) {
                q = '?' + OC.buildQueryString(params);
            }
Severity: Major
Found in apps/files/js/files.js and 1 other location - About 1 hr to fix
apps/files_trashbin/js/filelist.js on lines 111..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 63.

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

    public function __construct(
        $AppName,
        IRequest $request,
        IConfig $config,
        IClientService $clientService,
Severity: Major
Found in settings/Controller/CheckSetupController.php and 3 other locations - About 1 hr to fix
apps/federation/lib/Controller/OCSAuthAPIController.php on lines 72..88
apps/files/lib/Controller/ApiController.php on lines 69..84
core/Controller/AppRegistryController.php on lines 51..66

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

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

    public function __construct(
        $appName,
        IRequest $request,
        IAppManager $appManager,
        IRootFolder $rootFolder,
Severity: Major
Found in core/Controller/AppRegistryController.php and 3 other locations - About 1 hr to fix
apps/federation/lib/Controller/OCSAuthAPIController.php on lines 72..88
apps/files/lib/Controller/ApiController.php on lines 69..84
settings/Controller/CheckSetupController.php on lines 60..75

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

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

    public function __construct(
        $appName,
        IRequest $request,
        IUserSession $userSession,
        TagService $tagService,
Severity: Major
Found in apps/files/lib/Controller/ApiController.php and 3 other locations - About 1 hr to fix
apps/federation/lib/Controller/OCSAuthAPIController.php on lines 72..88
core/Controller/AppRegistryController.php on lines 51..66
settings/Controller/CheckSetupController.php on lines 60..75

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

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 {
            $message = $this->mailer->createMessage();
            $message->setTo([$email => $name]);
            $message->setSubject($this->l10n->t('%s password reset', [$this->defaults->getName()]));
            $message->setPlainBody($msgAlt);
Severity: Major
Found in core/Controller/LostController.php and 1 other location - About 1 hr to fix
core/Controller/LostController.php on lines 290..302

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

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

    public function __construct(
        $appName,
        IRequest $request,
        ISecureRandom $secureRandom,
        IJobList $jobList,
Severity: Major
Found in apps/federation/lib/Controller/OCSAuthAPIController.php and 3 other locations - About 1 hr to fix
apps/files/lib/Controller/ApiController.php on lines 69..84
core/Controller/AppRegistryController.php on lines 51..66
settings/Controller/CheckSetupController.php on lines 60..75

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

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 (!$exists) {
            \OC_Hook::emit(Filesystem::CLASSNAME, Filesystem::signal_create, [
                Filesystem::signal_param_path => $this->getHookPath($path),
                Filesystem::signal_param_run => &$run,
            ]);
Severity: Major
Found in lib/private/Files/View.php and 1 other location - About 1 hr to fix
lib/private/Files/View.php on lines 647..659

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

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

        $query->update('share')
            ->set('uid_owner', $query->createParameter('uid_owner'))
            ->where(
                $query->expr()->andX(
                    $query->expr()->eq('id', $query->createParameter('shareid')),
Severity: Major
Found in apps/files/lib/Command/TroubleshootTransferOwnership.php and 1 other location - About 1 hr to fix
apps/files/lib/Command/TroubleshootTransferOwnership.php on lines 401..411

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

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 {
                $message = $this->mailer->createMessage();
                $message->setTo([$email => $name]);
                $message->setSubject($this->l10n->t('%s password changed successfully', [$this->defaults->getName()]));
                $message->setPlainBody($msgAlt);
Severity: Major
Found in core/Controller/LostController.php and 1 other location - About 1 hr to fix
core/Controller/LostController.php on lines 376..388

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

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

        $query->update('share')
            ->set('uid_initiator', $query->createParameter('uid_initiator'))
            ->where(
                $query->expr()->andX(
                    $query->expr()->eq('id', $query->createParameter('shareid')),
Severity: Major
Found in apps/files/lib/Command/TroubleshootTransferOwnership.php and 1 other location - About 1 hr to fix
apps/files/lib/Command/TroubleshootTransferOwnership.php on lines 430..440

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

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