fisharebest/webtrees

View on GitHub

Showing 673 of 2,400 total issues

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Module/LanguageSwedish.php and 1 other location - About 7 hrs to fix
app/Module/LanguageFinnish.php on lines 1..97

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

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

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Module/LanguageFinnish.php and 1 other location - About 7 hrs to fix
app/Module/LanguageSwedish.php on lines 1..98

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

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

        $wrows = DB::table('families')
            ->where('f_file', '=', $this->tree->id())
            ->join('dates AS married', static function (JoinClause $join): void {
                $join
                    ->on('married.d_file', '=', 'f_file')
Severity: Major
Found in app/Statistics/Repository/FamilyRepository.php and 1 other location - About 7 hrs to fix
app/Statistics/Repository/FamilyRepository.php on lines 1015..1034

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

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

        $hrows = DB::table('families')
            ->where('f_file', '=', $this->tree->id())
            ->join('dates AS married', static function (JoinClause $join): void {
                $join
                    ->on('married.d_file', '=', 'f_file')
Severity: Major
Found in app/Statistics/Repository/FamilyRepository.php and 1 other location - About 7 hrs to fix
app/Statistics/Repository/FamilyRepository.php on lines 1036..1055

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Http/RequestHandlers/TomSelectFamily.php and 9 other locations - About 7 hrs to fix
app/Http/RequestHandlers/TomSelectIndividual.php on lines 1..75
app/Http/RequestHandlers/TomSelectLocation.php on lines 1..76
app/Http/RequestHandlers/TomSelectMediaObject.php on lines 1..76
app/Http/RequestHandlers/TomSelectNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectRepository.php on lines 1..76
app/Http/RequestHandlers/TomSelectSharedNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectSource.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmission.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmitter.php on lines 1..76

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Http/RequestHandlers/TomSelectIndividual.php and 9 other locations - About 7 hrs to fix
app/Http/RequestHandlers/TomSelectFamily.php on lines 1..76
app/Http/RequestHandlers/TomSelectLocation.php on lines 1..76
app/Http/RequestHandlers/TomSelectMediaObject.php on lines 1..76
app/Http/RequestHandlers/TomSelectNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectRepository.php on lines 1..76
app/Http/RequestHandlers/TomSelectSharedNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectSource.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmission.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmitter.php on lines 1..76

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Http/RequestHandlers/TomSelectSource.php and 9 other locations - About 7 hrs to fix
app/Http/RequestHandlers/TomSelectFamily.php on lines 1..76
app/Http/RequestHandlers/TomSelectIndividual.php on lines 1..75
app/Http/RequestHandlers/TomSelectLocation.php on lines 1..76
app/Http/RequestHandlers/TomSelectMediaObject.php on lines 1..76
app/Http/RequestHandlers/TomSelectNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectRepository.php on lines 1..76
app/Http/RequestHandlers/TomSelectSharedNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmission.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmitter.php on lines 1..76

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Http/RequestHandlers/TomSelectLocation.php and 9 other locations - About 7 hrs to fix
app/Http/RequestHandlers/TomSelectFamily.php on lines 1..76
app/Http/RequestHandlers/TomSelectIndividual.php on lines 1..75
app/Http/RequestHandlers/TomSelectMediaObject.php on lines 1..76
app/Http/RequestHandlers/TomSelectNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectRepository.php on lines 1..76
app/Http/RequestHandlers/TomSelectSharedNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectSource.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmission.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmitter.php on lines 1..76

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Http/RequestHandlers/TomSelectNote.php and 9 other locations - About 7 hrs to fix
app/Http/RequestHandlers/TomSelectFamily.php on lines 1..76
app/Http/RequestHandlers/TomSelectIndividual.php on lines 1..75
app/Http/RequestHandlers/TomSelectLocation.php on lines 1..76
app/Http/RequestHandlers/TomSelectMediaObject.php on lines 1..76
app/Http/RequestHandlers/TomSelectRepository.php on lines 1..76
app/Http/RequestHandlers/TomSelectSharedNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectSource.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmission.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmitter.php on lines 1..76

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Http/RequestHandlers/TomSelectSubmitter.php and 9 other locations - About 7 hrs to fix
app/Http/RequestHandlers/TomSelectFamily.php on lines 1..76
app/Http/RequestHandlers/TomSelectIndividual.php on lines 1..75
app/Http/RequestHandlers/TomSelectLocation.php on lines 1..76
app/Http/RequestHandlers/TomSelectMediaObject.php on lines 1..76
app/Http/RequestHandlers/TomSelectNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectRepository.php on lines 1..76
app/Http/RequestHandlers/TomSelectSharedNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectSource.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmission.php on lines 1..76

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Http/RequestHandlers/TomSelectSubmission.php and 9 other locations - About 7 hrs to fix
app/Http/RequestHandlers/TomSelectFamily.php on lines 1..76
app/Http/RequestHandlers/TomSelectIndividual.php on lines 1..75
app/Http/RequestHandlers/TomSelectLocation.php on lines 1..76
app/Http/RequestHandlers/TomSelectMediaObject.php on lines 1..76
app/Http/RequestHandlers/TomSelectNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectRepository.php on lines 1..76
app/Http/RequestHandlers/TomSelectSharedNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectSource.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmitter.php on lines 1..76

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Http/RequestHandlers/TomSelectSharedNote.php and 9 other locations - About 7 hrs to fix
app/Http/RequestHandlers/TomSelectFamily.php on lines 1..76
app/Http/RequestHandlers/TomSelectIndividual.php on lines 1..75
app/Http/RequestHandlers/TomSelectLocation.php on lines 1..76
app/Http/RequestHandlers/TomSelectMediaObject.php on lines 1..76
app/Http/RequestHandlers/TomSelectNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectRepository.php on lines 1..76
app/Http/RequestHandlers/TomSelectSource.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmission.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmitter.php on lines 1..76

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Http/RequestHandlers/TomSelectRepository.php and 9 other locations - About 7 hrs to fix
app/Http/RequestHandlers/TomSelectFamily.php on lines 1..76
app/Http/RequestHandlers/TomSelectIndividual.php on lines 1..75
app/Http/RequestHandlers/TomSelectLocation.php on lines 1..76
app/Http/RequestHandlers/TomSelectMediaObject.php on lines 1..76
app/Http/RequestHandlers/TomSelectNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectSharedNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectSource.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmission.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmitter.php on lines 1..76

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Http/RequestHandlers/TomSelectMediaObject.php and 9 other locations - About 7 hrs to fix
app/Http/RequestHandlers/TomSelectFamily.php on lines 1..76
app/Http/RequestHandlers/TomSelectIndividual.php on lines 1..75
app/Http/RequestHandlers/TomSelectLocation.php on lines 1..76
app/Http/RequestHandlers/TomSelectNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectRepository.php on lines 1..76
app/Http/RequestHandlers/TomSelectSharedNote.php on lines 1..76
app/Http/RequestHandlers/TomSelectSource.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmission.php on lines 1..76
app/Http/RequestHandlers/TomSelectSubmitter.php on lines 1..76

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Elements/XrefLocation.php and 4 other locations - About 7 hrs to fix
app/Elements/XrefNote.php on lines 1..79
app/Elements/XrefSharedNote.php on lines 1..79
app/Elements/XrefSubmission.php on lines 1..79
app/Elements/XrefSubmitter.php on lines 1..79

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Elements/XrefNote.php and 4 other locations - About 7 hrs to fix
app/Elements/XrefLocation.php on lines 1..79
app/Elements/XrefSharedNote.php on lines 1..79
app/Elements/XrefSubmission.php on lines 1..79
app/Elements/XrefSubmitter.php on lines 1..79

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Elements/XrefSubmission.php and 4 other locations - About 7 hrs to fix
app/Elements/XrefLocation.php on lines 1..79
app/Elements/XrefNote.php on lines 1..79
app/Elements/XrefSharedNote.php on lines 1..79
app/Elements/XrefSubmitter.php on lines 1..79

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Elements/XrefSharedNote.php and 4 other locations - About 7 hrs to fix
app/Elements/XrefLocation.php on lines 1..79
app/Elements/XrefNote.php on lines 1..79
app/Elements/XrefSubmission.php on lines 1..79
app/Elements/XrefSubmitter.php on lines 1..79

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Elements/XrefSubmitter.php and 4 other locations - About 7 hrs to fix
app/Elements/XrefLocation.php on lines 1..79
app/Elements/XrefNote.php on lines 1..79
app/Elements/XrefSharedNote.php on lines 1..79
app/Elements/XrefSubmission.php on lines 1..79

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

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

    protected function monthNameNominativeCase(int $month, bool $leap_year): string
    {
        static $translated_month_names;

        if ($translated_month_names === null) {
Severity: Major
Found in app/Date/AbstractGregorianJulianDate.php and 13 other locations - About 7 hrs to fix
app/Date/AbstractGregorianJulianDate.php on lines 121..144
app/Date/AbstractGregorianJulianDate.php on lines 156..179
app/Date/AbstractGregorianJulianDate.php on lines 191..214
app/Date/AbstractGregorianJulianDate.php on lines 224..247
app/Date/HijriDate.php on lines 89..124
app/Date/HijriDate.php on lines 134..169
app/Date/HijriDate.php on lines 179..214
app/Date/HijriDate.php on lines 224..259
app/Date/JalaliDate.php on lines 86..121
app/Date/JalaliDate.php on lines 131..166
app/Date/JalaliDate.php on lines 176..211
app/Date/JalaliDate.php on lines 221..256
app/Date/JalaliDate.php on lines 266..289

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

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