owncloud/core

View on GitHub

Showing 1,268 of 4,503 total issues

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

OC.L10N.register(
    "federatedfilesharing",
    {
    "Federated sharing" : "Partajare federalizată",
    "Loading..." : "Se încarcă...",
Severity: Major
Found in apps/federatedfilesharing/l10n/ro.js and 59 other locations - About 4 hrs to fix
apps/comments/l10n/ar.js on lines 1..26
apps/comments/l10n/bg_BG.js on lines 1..26
apps/comments/l10n/ca.js on lines 1..26
apps/comments/l10n/cs_CZ.js on lines 1..26
apps/comments/l10n/da.js on lines 1..26
apps/comments/l10n/de.js on lines 1..26
apps/comments/l10n/de_CH.js on lines 1..26
apps/comments/l10n/de_DE.js on lines 1..26
apps/comments/l10n/el.js on lines 1..26
apps/comments/l10n/en_GB.js on lines 1..26
apps/comments/l10n/es.js on lines 1..26
apps/comments/l10n/es_AR.js on lines 1..26
apps/comments/l10n/es_MX.js on lines 1..26
apps/comments/l10n/eu.js on lines 1..26
apps/comments/l10n/fa.js on lines 1..26
apps/comments/l10n/fi_FI.js on lines 1..26
apps/comments/l10n/fr.js on lines 1..26
apps/comments/l10n/gl.js on lines 1..26
apps/comments/l10n/he.js on lines 1..26
apps/comments/l10n/hu_HU.js on lines 1..26
apps/comments/l10n/id.js on lines 1..26
apps/comments/l10n/is.js on lines 1..26
apps/comments/l10n/it.js on lines 1..26
apps/comments/l10n/ja.js on lines 1..26
apps/comments/l10n/ko.js on lines 1..26
apps/comments/l10n/lt_LT.js on lines 1..26
apps/comments/l10n/mk.js on lines 1..26
apps/comments/l10n/nb_NO.js on lines 1..26
apps/comments/l10n/nl.js on lines 1..26
apps/comments/l10n/oc.js on lines 1..26
apps/comments/l10n/pl.js on lines 1..26
apps/comments/l10n/pt_BR.js on lines 1..26
apps/comments/l10n/pt_PT.js on lines 1..26
apps/comments/l10n/ru.js on lines 1..26
apps/comments/l10n/ru_RU.js on lines 1..26
apps/comments/l10n/sl.js on lines 1..26
apps/comments/l10n/sq.js on lines 1..26
apps/comments/l10n/sv.js on lines 1..26
apps/comments/l10n/th_TH.js on lines 1..26
apps/comments/l10n/tr.js on lines 1..26
apps/comments/l10n/ug.js on lines 1..26
apps/comments/l10n/uk.js on lines 1..26
apps/comments/l10n/uz.js on lines 1..26
apps/comments/l10n/zh_CN.js on lines 1..26
apps/comments/l10n/zh_TW.js on lines 1..26
apps/federatedfilesharing/l10n/ast.js on lines 1..26
apps/federatedfilesharing/l10n/ca.js on lines 1..26
apps/federatedfilesharing/l10n/cs_CZ.js on lines 1..26
apps/federatedfilesharing/l10n/da.js on lines 1..26
apps/federatedfilesharing/l10n/fi_FI.js on lines 1..26
apps/federatedfilesharing/l10n/hu_HU.js on lines 1..26
apps/federatedfilesharing/l10n/ja.js on lines 1..26
apps/federatedfilesharing/l10n/oc.js on lines 1..26
apps/federatedfilesharing/l10n/pl.js on lines 1..26
apps/federatedfilesharing/l10n/pt_PT.js on lines 1..26
apps/federatedfilesharing/l10n/sl.js on lines 1..26
apps/files_external/l10n/nn_NO.js on lines 1..26
lib/l10n/si.js on lines 1..26
settings/l10n/mn.js on lines 1..26

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

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

OC.L10N.register(
    "federatedfilesharing",
    {
    "Federated sharing" : "Partilha Federada",
    "Loading..." : "A carregar...",
Severity: Major
Found in apps/federatedfilesharing/l10n/pt_PT.js and 59 other locations - About 4 hrs to fix
apps/comments/l10n/ar.js on lines 1..26
apps/comments/l10n/bg_BG.js on lines 1..26
apps/comments/l10n/ca.js on lines 1..26
apps/comments/l10n/cs_CZ.js on lines 1..26
apps/comments/l10n/da.js on lines 1..26
apps/comments/l10n/de.js on lines 1..26
apps/comments/l10n/de_CH.js on lines 1..26
apps/comments/l10n/de_DE.js on lines 1..26
apps/comments/l10n/el.js on lines 1..26
apps/comments/l10n/en_GB.js on lines 1..26
apps/comments/l10n/es.js on lines 1..26
apps/comments/l10n/es_AR.js on lines 1..26
apps/comments/l10n/es_MX.js on lines 1..26
apps/comments/l10n/eu.js on lines 1..26
apps/comments/l10n/fa.js on lines 1..26
apps/comments/l10n/fi_FI.js on lines 1..26
apps/comments/l10n/fr.js on lines 1..26
apps/comments/l10n/gl.js on lines 1..26
apps/comments/l10n/he.js on lines 1..26
apps/comments/l10n/hu_HU.js on lines 1..26
apps/comments/l10n/id.js on lines 1..26
apps/comments/l10n/is.js on lines 1..26
apps/comments/l10n/it.js on lines 1..26
apps/comments/l10n/ja.js on lines 1..26
apps/comments/l10n/ko.js on lines 1..26
apps/comments/l10n/lt_LT.js on lines 1..26
apps/comments/l10n/mk.js on lines 1..26
apps/comments/l10n/nb_NO.js on lines 1..26
apps/comments/l10n/nl.js on lines 1..26
apps/comments/l10n/oc.js on lines 1..26
apps/comments/l10n/pl.js on lines 1..26
apps/comments/l10n/pt_BR.js on lines 1..26
apps/comments/l10n/pt_PT.js on lines 1..26
apps/comments/l10n/ru.js on lines 1..26
apps/comments/l10n/ru_RU.js on lines 1..26
apps/comments/l10n/sl.js on lines 1..26
apps/comments/l10n/sq.js on lines 1..26
apps/comments/l10n/sv.js on lines 1..26
apps/comments/l10n/th_TH.js on lines 1..26
apps/comments/l10n/tr.js on lines 1..26
apps/comments/l10n/ug.js on lines 1..26
apps/comments/l10n/uk.js on lines 1..26
apps/comments/l10n/uz.js on lines 1..26
apps/comments/l10n/zh_CN.js on lines 1..26
apps/comments/l10n/zh_TW.js on lines 1..26
apps/federatedfilesharing/l10n/ast.js on lines 1..26
apps/federatedfilesharing/l10n/ca.js on lines 1..26
apps/federatedfilesharing/l10n/cs_CZ.js on lines 1..26
apps/federatedfilesharing/l10n/da.js on lines 1..26
apps/federatedfilesharing/l10n/fi_FI.js on lines 1..26
apps/federatedfilesharing/l10n/hu_HU.js on lines 1..26
apps/federatedfilesharing/l10n/ja.js on lines 1..26
apps/federatedfilesharing/l10n/oc.js on lines 1..26
apps/federatedfilesharing/l10n/pl.js on lines 1..26
apps/federatedfilesharing/l10n/ro.js on lines 1..26
apps/federatedfilesharing/l10n/sl.js on lines 1..26
apps/files_external/l10n/nn_NO.js on lines 1..26
lib/l10n/si.js on lines 1..26
settings/l10n/mn.js on lines 1..26

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

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

    _.extend(OC.Files.Client, {
        PROPERTY_FILEID:    '{' + OC.Files.Client.NS_OWNCLOUD + '}id',
        PROPERTY_VERSION_EDITED_BY:    '{' + OC.Files.Client.NS_OWNCLOUD + '}meta-version-edited-by',
        PROPERTY_VERSION_EDITED_BY_NAME:    '{' + OC.Files.Client.NS_OWNCLOUD + '}meta-version-edited-by-name',
        PROPERTY_VERSION_TAG:    '{' + OC.Files.Client.NS_OWNCLOUD + '}meta-version-tag',
Severity: Major
Found in apps/files_versions/js/versioncollection.js and 1 other location - About 4 hrs to fix
apps/files_versions/js/versionsrootmodel.js on lines 15..20

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

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

    _.extend(OC.Files.Client, {
        PROPERTY_FILEID:    '{' + OC.Files.Client.NS_OWNCLOUD + '}id',
        PROPERTY_VERSION_EDITED_BY:    '{' + OC.Files.Client.NS_OWNCLOUD + '}meta-version-edited-by',
        PROPERTY_VERSION_EDITED_BY_NAME:    '{' + OC.Files.Client.NS_OWNCLOUD + '}meta-version-edited-by-name',
        PROPERTY_VERSION_TAG:    '{' + OC.Files.Client.NS_OWNCLOUD + '}meta-version-tag',
Severity: Major
Found in apps/files_versions/js/versionsrootmodel.js and 1 other location - About 4 hrs to fix
apps/files_versions/js/versioncollection.js on lines 15..20

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

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

                    $('<li class="shareTree-item">').append( $icon, $name, $path).appendTo($list).click(function() {
                        self.changeDirectory(share.path.replace(folder.name, ''), true).then(function() {
                            self._updateDetailsView(folder.name, true);
                        }).catch(function(e) {
                            console.error(e);
Severity: Major
Found in apps/files/js/filelist.js and 1 other location - About 4 hrs to fix
apps/files/js/filelist.js on lines 1976..1982

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

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

                    $('<li class="shareTree-item">').append( $icon, $name, $path).appendTo($list).click(function() {
                        self.changeDirectory(share.path.replace(folder.name, ''), true).then(function() {
                            self._updateDetailsView(folder.name, true);
                        }).catch(function(e) {
                            console.error(e);
Severity: Major
Found in apps/files/js/filelist.js and 1 other location - About 4 hrs to fix
apps/files/js/filelist.js on lines 2014..2020

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

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

        foreach ($changedProperties as $propertyName => $propertyValue) {
            $propertyExists = \array_key_exists($propertyName, $existingProperties);
            // If it was null, we need to delete the property
            if ($propertyValue === null) {
                if ($propertyExists) {
Severity: Major
Found in apps/dav/lib/DAV/FileCustomPropertiesBackend.php and 1 other location - About 4 hrs to fix
apps/dav/lib/DAV/MiscCustomPropertiesBackend.php on lines 116..153

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

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

        foreach ($changedProperties as $propertyName => $propertyValue) {
            $propertyExists = \array_key_exists($propertyName, $existingProperties);
            // If it was null, we need to delete the property
            if ($propertyValue === null) {
                if ($propertyExists) {
Severity: Major
Found in apps/dav/lib/DAV/MiscCustomPropertiesBackend.php and 1 other location - About 4 hrs to fix
apps/dav/lib/DAV/FileCustomPropertiesBackend.php on lines 171..208

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

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

    private function loadFSApps() {
        $enabledApps = \OC_App::getEnabledApps();
        foreach ($enabledApps as $enabledApp) {
            if ($enabledApp !== 'files_external' && \OC_App::isType($enabledApp, ['filesystem'])) {
                try {
apps/files_external/appinfo/Migrations/Version20220329110116.php on lines 86..105

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

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

    private function loadFSApps() {
        $enabledApps = \OC_App::getEnabledApps();
        foreach ($enabledApps as $enabledApp) {
            if ($enabledApp !== 'files_external' && \OC_App::isType($enabledApp, ['filesystem'])) {
                try {
apps/files_external/appinfo/Migrations/Version20210511082903.php on lines 112..131

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

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

OC.L10N.register(
    "settings",
    {
    "Couldn't send reset email. Please contact your administrator." : "E-Mail zum Zurücksetzen konnte nicht gesendet werden. Bitte wende Dich an Deinem Administrator.",
    "Saved" : "Gespeichert",
Severity: Major
Found in settings/l10n/nds.js and 3 other locations - About 4 hrs to fix
apps/files_external/l10n/vi.js on lines 1..25
lib/l10n/bs.js on lines 1..25
lib/l10n/si_LK.js on lines 1..25

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

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

OC.L10N.register(
    "files_external",
    {
    "External storage" : "Lưu trữ ngoài",
    "Personal" : "Cá nhân",
Severity: Major
Found in apps/files_external/l10n/vi.js and 3 other locations - About 4 hrs to fix
lib/l10n/bs.js on lines 1..25
lib/l10n/si_LK.js on lines 1..25
settings/l10n/nds.js on lines 1..25

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

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

OC.L10N.register(
    "lib",
    {
    "Unknown filetype" : "Nepoznat tip datoteke",
    "Invalid image" : "Nevažeća datoteka",
Severity: Major
Found in lib/l10n/bs.js and 3 other locations - About 4 hrs to fix
apps/files_external/l10n/vi.js on lines 1..25
lib/l10n/si_LK.js on lines 1..25
settings/l10n/nds.js on lines 1..25

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

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

OC.L10N.register(
    "lib",
    {
    "today" : "අද",
    "yesterday" : "ඊයේ",
Severity: Major
Found in lib/l10n/si_LK.js and 3 other locations - About 4 hrs to fix
apps/files_external/l10n/vi.js on lines 1..25
lib/l10n/bs.js on lines 1..25
settings/l10n/nds.js on lines 1..25

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

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 Thomas Müller <thomas.mueller@tmit.eu>
 *
 * @copyright Copyright (c) 2018, ownCloud GmbH
Severity: Major
Found in core/Command/User/Enable.php and 1 other location - About 4 hrs to fix
core/Command/User/Disable.php on lines 1..64

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

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 Thomas Müller <thomas.mueller@tmit.eu>
 *
 * @copyright Copyright (c) 2018, ownCloud GmbH
Severity: Major
Found in core/Command/User/Disable.php and 1 other location - About 4 hrs to fix
core/Command/User/Enable.php on lines 1..64

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

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

$this->create('files_sharing.sharecontroller.showShare', '/s/{token}')->action(static function ($urlParams) {
    $webBaseUrl = \OC::$server->getConfig()->getSystemValue('web.baseUrl', null);
    if (!$webBaseUrl) {
        // Check the old phoenix.baseUrl system key to provide compatibility across the name change
        $webBaseUrl = \OC::$server->getConfig()->getSystemValue('phoenix.baseUrl', null);
Severity: Major
Found in core/routes.php and 1 other location - About 3 hrs to fix
core/routes.php on lines 103..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 161.

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

$this->create('files.viewcontroller.showFile', '/f/{fileId}')->action(static function ($urlParams) {
    $webBaseUrl = \OC::$server->getConfig()->getSystemValue('web.baseUrl', null);
    if (!$webBaseUrl) {
        // Check the old phoenix.baseUrl system key to provide compatibility across the name change
        $webBaseUrl = \OC::$server->getConfig()->getSystemValue('phoenix.baseUrl', null);
Severity: Major
Found in core/routes.php and 1 other location - About 3 hrs to fix
core/routes.php on lines 120..134

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

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

OC.L10N.register(
    "lib",
    {
    "Cannot write into \"config\" directory!" : "No se puede escribir en el directorio \"config\"!",
    "This can usually be fixed by giving the webserver write access to the config directory" : "Generalmente esto se puede resolver otorgando permisos de escritura al servidor web en la carpeta configurada",
Severity: Major
Found in lib/l10n/es_CL.js and 6 other locations - About 3 hrs to fix
apps/federatedfilesharing/l10n/sk_SK.js on lines 1..24
apps/files_external/l10n/ka_GE.js on lines 1..24
apps/files_external/l10n/ug.js on lines 1..24
apps/systemtags/l10n/eo.js on lines 1..24
lib/l10n/ta.js on lines 1..24
lib/l10n/ta_LK.js on lines 1..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 113.

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

OC.L10N.register(
    "systemtags",
    {
    "Tags" : "Etikedoj",
    "Tagged files" : "Etikeditaj dosieroj",
Severity: Major
Found in apps/systemtags/l10n/eo.js and 6 other locations - About 3 hrs to fix
apps/federatedfilesharing/l10n/sk_SK.js on lines 1..24
apps/files_external/l10n/ka_GE.js on lines 1..24
apps/files_external/l10n/ug.js on lines 1..24
lib/l10n/es_CL.js on lines 1..24
lib/l10n/ta.js on lines 1..24
lib/l10n/ta_LK.js on lines 1..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 113.

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