fisharebest/webtrees

View on GitHub

Showing 677 of 2,403 total issues

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Census/CensusOfFrance1911.php and 20 other locations - About 4 hrs to fix
app/Census/CensusOfEngland1851.php on lines 1..55
app/Census/CensusOfEngland1861.php on lines 1..55
app/Census/CensusOfEngland1871.php on lines 1..55
app/Census/CensusOfEngland1881.php on lines 1..55
app/Census/CensusOfFrance1901.php on lines 1..55
app/Census/CensusOfFrance1906.php on lines 1..55
app/Census/CensusOfFrance1921.php on lines 1..55
app/Census/CensusOfFrance1926.php on lines 1..55
app/Census/CensusOfFrance1931.php on lines 1..55
app/Census/CensusOfFrance1936.php on lines 1..55
app/Census/CensusOfScotland1851.php on lines 1..55
app/Census/CensusOfScotland1881.php on lines 1..55
app/Census/CensusOfUnitedStates1790.php on lines 1..55
app/Census/CensusOfWales1851.php on lines 1..55
app/Census/CensusOfWales1861.php on lines 1..55
app/Census/CensusOfWales1871.php on lines 1..55
app/Census/CensusOfWales1881.php on lines 1..55
app/Census/RegisterOfEngland1939.php on lines 1..55
app/Census/RegisterOfScotland1939.php on lines 1..55
app/Census/RegisterOfWales1939.php on lines 1..55

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Census/CensusOfFrance1906.php and 20 other locations - About 4 hrs to fix
app/Census/CensusOfEngland1851.php on lines 1..55
app/Census/CensusOfEngland1861.php on lines 1..55
app/Census/CensusOfEngland1871.php on lines 1..55
app/Census/CensusOfEngland1881.php on lines 1..55
app/Census/CensusOfFrance1901.php on lines 1..55
app/Census/CensusOfFrance1911.php on lines 1..55
app/Census/CensusOfFrance1921.php on lines 1..55
app/Census/CensusOfFrance1926.php on lines 1..55
app/Census/CensusOfFrance1931.php on lines 1..55
app/Census/CensusOfFrance1936.php on lines 1..55
app/Census/CensusOfScotland1851.php on lines 1..55
app/Census/CensusOfScotland1881.php on lines 1..55
app/Census/CensusOfUnitedStates1790.php on lines 1..55
app/Census/CensusOfWales1851.php on lines 1..55
app/Census/CensusOfWales1861.php on lines 1..55
app/Census/CensusOfWales1871.php on lines 1..55
app/Census/CensusOfWales1881.php on lines 1..55
app/Census/RegisterOfEngland1939.php on lines 1..55
app/Census/RegisterOfScotland1939.php on lines 1..55
app/Census/RegisterOfWales1939.php on lines 1..55

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Census/CensusOfFrance1936.php and 20 other locations - About 4 hrs to fix
app/Census/CensusOfEngland1851.php on lines 1..55
app/Census/CensusOfEngland1861.php on lines 1..55
app/Census/CensusOfEngland1871.php on lines 1..55
app/Census/CensusOfEngland1881.php on lines 1..55
app/Census/CensusOfFrance1901.php on lines 1..55
app/Census/CensusOfFrance1906.php on lines 1..55
app/Census/CensusOfFrance1911.php on lines 1..55
app/Census/CensusOfFrance1921.php on lines 1..55
app/Census/CensusOfFrance1926.php on lines 1..55
app/Census/CensusOfFrance1931.php on lines 1..55
app/Census/CensusOfScotland1851.php on lines 1..55
app/Census/CensusOfScotland1881.php on lines 1..55
app/Census/CensusOfUnitedStates1790.php on lines 1..55
app/Census/CensusOfWales1851.php on lines 1..55
app/Census/CensusOfWales1861.php on lines 1..55
app/Census/CensusOfWales1871.php on lines 1..55
app/Census/CensusOfWales1881.php on lines 1..55
app/Census/RegisterOfEngland1939.php on lines 1..55
app/Census/RegisterOfScotland1939.php on lines 1..55
app/Census/RegisterOfWales1939.php on lines 1..55

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Census/CensusOfWales1881.php and 20 other locations - About 4 hrs to fix
app/Census/CensusOfEngland1851.php on lines 1..55
app/Census/CensusOfEngland1861.php on lines 1..55
app/Census/CensusOfEngland1871.php on lines 1..55
app/Census/CensusOfEngland1881.php on lines 1..55
app/Census/CensusOfFrance1901.php on lines 1..55
app/Census/CensusOfFrance1906.php on lines 1..55
app/Census/CensusOfFrance1911.php on lines 1..55
app/Census/CensusOfFrance1921.php on lines 1..55
app/Census/CensusOfFrance1926.php on lines 1..55
app/Census/CensusOfFrance1931.php on lines 1..55
app/Census/CensusOfFrance1936.php on lines 1..55
app/Census/CensusOfScotland1851.php on lines 1..55
app/Census/CensusOfScotland1881.php on lines 1..55
app/Census/CensusOfUnitedStates1790.php on lines 1..55
app/Census/CensusOfWales1851.php on lines 1..55
app/Census/CensusOfWales1861.php on lines 1..55
app/Census/CensusOfWales1871.php on lines 1..55
app/Census/RegisterOfEngland1939.php on lines 1..55
app/Census/RegisterOfScotland1939.php on lines 1..55
app/Census/RegisterOfWales1939.php on lines 1..55

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Census/RegisterOfWales1939.php and 20 other locations - About 4 hrs to fix
app/Census/CensusOfEngland1851.php on lines 1..55
app/Census/CensusOfEngland1861.php on lines 1..55
app/Census/CensusOfEngland1871.php on lines 1..55
app/Census/CensusOfEngland1881.php on lines 1..55
app/Census/CensusOfFrance1901.php on lines 1..55
app/Census/CensusOfFrance1906.php on lines 1..55
app/Census/CensusOfFrance1911.php on lines 1..55
app/Census/CensusOfFrance1921.php on lines 1..55
app/Census/CensusOfFrance1926.php on lines 1..55
app/Census/CensusOfFrance1931.php on lines 1..55
app/Census/CensusOfFrance1936.php on lines 1..55
app/Census/CensusOfScotland1851.php on lines 1..55
app/Census/CensusOfScotland1881.php on lines 1..55
app/Census/CensusOfUnitedStates1790.php on lines 1..55
app/Census/CensusOfWales1851.php on lines 1..55
app/Census/CensusOfWales1861.php on lines 1..55
app/Census/CensusOfWales1871.php on lines 1..55
app/Census/CensusOfWales1881.php on lines 1..55
app/Census/RegisterOfEngland1939.php on lines 1..55
app/Census/RegisterOfScotland1939.php on lines 1..55

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

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

    protected function addIndividualToCart(Individual $individual): void
    {
        $cart = Session::get('cart');
        $cart = is_array($cart) ? $cart : [];

Severity: Major
Found in app/Module/ClippingsCartModule.php and 1 other location - About 4 hrs to fix
app/Module/ClippingsCartModule.php on lines 810..828

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Census/CensusOfWales1851.php and 20 other locations - About 4 hrs to fix
app/Census/CensusOfEngland1851.php on lines 1..55
app/Census/CensusOfEngland1861.php on lines 1..55
app/Census/CensusOfEngland1871.php on lines 1..55
app/Census/CensusOfEngland1881.php on lines 1..55
app/Census/CensusOfFrance1901.php on lines 1..55
app/Census/CensusOfFrance1906.php on lines 1..55
app/Census/CensusOfFrance1911.php on lines 1..55
app/Census/CensusOfFrance1921.php on lines 1..55
app/Census/CensusOfFrance1926.php on lines 1..55
app/Census/CensusOfFrance1931.php on lines 1..55
app/Census/CensusOfFrance1936.php on lines 1..55
app/Census/CensusOfScotland1851.php on lines 1..55
app/Census/CensusOfScotland1881.php on lines 1..55
app/Census/CensusOfUnitedStates1790.php on lines 1..55
app/Census/CensusOfWales1861.php on lines 1..55
app/Census/CensusOfWales1871.php on lines 1..55
app/Census/CensusOfWales1881.php on lines 1..55
app/Census/RegisterOfEngland1939.php on lines 1..55
app/Census/RegisterOfScotland1939.php on lines 1..55
app/Census/RegisterOfWales1939.php on lines 1..55

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Census/CensusOfUnitedStates1790.php and 20 other locations - About 4 hrs to fix
app/Census/CensusOfEngland1851.php on lines 1..55
app/Census/CensusOfEngland1861.php on lines 1..55
app/Census/CensusOfEngland1871.php on lines 1..55
app/Census/CensusOfEngland1881.php on lines 1..55
app/Census/CensusOfFrance1901.php on lines 1..55
app/Census/CensusOfFrance1906.php on lines 1..55
app/Census/CensusOfFrance1911.php on lines 1..55
app/Census/CensusOfFrance1921.php on lines 1..55
app/Census/CensusOfFrance1926.php on lines 1..55
app/Census/CensusOfFrance1931.php on lines 1..55
app/Census/CensusOfFrance1936.php on lines 1..55
app/Census/CensusOfScotland1851.php on lines 1..55
app/Census/CensusOfScotland1881.php on lines 1..55
app/Census/CensusOfWales1851.php on lines 1..55
app/Census/CensusOfWales1861.php on lines 1..55
app/Census/CensusOfWales1871.php on lines 1..55
app/Census/CensusOfWales1881.php on lines 1..55
app/Census/RegisterOfEngland1939.php on lines 1..55
app/Census/RegisterOfScotland1939.php on lines 1..55
app/Census/RegisterOfWales1939.php on lines 1..55

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Census/CensusOfWales1861.php and 20 other locations - About 4 hrs to fix
app/Census/CensusOfEngland1851.php on lines 1..55
app/Census/CensusOfEngland1861.php on lines 1..55
app/Census/CensusOfEngland1871.php on lines 1..55
app/Census/CensusOfEngland1881.php on lines 1..55
app/Census/CensusOfFrance1901.php on lines 1..55
app/Census/CensusOfFrance1906.php on lines 1..55
app/Census/CensusOfFrance1911.php on lines 1..55
app/Census/CensusOfFrance1921.php on lines 1..55
app/Census/CensusOfFrance1926.php on lines 1..55
app/Census/CensusOfFrance1931.php on lines 1..55
app/Census/CensusOfFrance1936.php on lines 1..55
app/Census/CensusOfScotland1851.php on lines 1..55
app/Census/CensusOfScotland1881.php on lines 1..55
app/Census/CensusOfUnitedStates1790.php on lines 1..55
app/Census/CensusOfWales1851.php on lines 1..55
app/Census/CensusOfWales1871.php on lines 1..55
app/Census/CensusOfWales1881.php on lines 1..55
app/Census/RegisterOfEngland1939.php on lines 1..55
app/Census/RegisterOfScotland1939.php on lines 1..55
app/Census/RegisterOfWales1939.php on lines 1..55

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

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

<?php

/**
 * webtrees: online genealogy
 * Copyright (C) 2023 webtrees development team
Severity: Major
Found in app/Census/CensusOfEngland1871.php and 20 other locations - About 4 hrs to fix
app/Census/CensusOfEngland1851.php on lines 1..55
app/Census/CensusOfEngland1861.php on lines 1..55
app/Census/CensusOfEngland1881.php on lines 1..55
app/Census/CensusOfFrance1901.php on lines 1..55
app/Census/CensusOfFrance1906.php on lines 1..55
app/Census/CensusOfFrance1911.php on lines 1..55
app/Census/CensusOfFrance1921.php on lines 1..55
app/Census/CensusOfFrance1926.php on lines 1..55
app/Census/CensusOfFrance1931.php on lines 1..55
app/Census/CensusOfFrance1936.php on lines 1..55
app/Census/CensusOfScotland1851.php on lines 1..55
app/Census/CensusOfScotland1881.php on lines 1..55
app/Census/CensusOfUnitedStates1790.php on lines 1..55
app/Census/CensusOfWales1851.php on lines 1..55
app/Census/CensusOfWales1861.php on lines 1..55
app/Census/CensusOfWales1871.php on lines 1..55
app/Census/CensusOfWales1881.php on lines 1..55
app/Census/RegisterOfEngland1939.php on lines 1..55
app/Census/RegisterOfScotland1939.php on lines 1..55
app/Census/RegisterOfWales1939.php on lines 1..55

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

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

            case 'nl':
                return new Collection([
                    "1 EVEN Koningen, graven en potestaten van Friesland\n2 TYPE vorstendom, graafschap, potestaat\n2 DATE FROM 600 TO 1515",
                    "1 EVEN Vorst-abt van Stavelot\n2 TYPE vorstendom\n2 DATE FROM 648 TO 1795",
                    "1 EVEN Graaf-bisschoppen van Utrecht\n2 TYPE bisdom\n2 DATE FROM 695 TO 1528",
Severity: Major
Found in app/Module/LowCountriesRulers.php and 1 other location - About 4 hrs to fix
app/Module/BritishMonarchs.php on lines 62..113

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

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

            case 'en-US':
                return new Collection([
                    "1 EVEN William I, William the Conqueror\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 25 DEC 1066 TO @#DJULIAN@ 09 SEP 1087",
                    "1 EVEN William II\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 26 SEP 1087 TO @#DJULIAN@ 02 AUG 1100",
                    "1 EVEN Henry I\n2 TYPE English King\n2 DATE FROM @#DJULIAN@ 05 AUG 1100 TO @#DJULIAN@ 01 DEC 1135",
Severity: Major
Found in app/Module/BritishMonarchs.php and 1 other location - About 4 hrs to fix
app/Module/LowCountriesRulers.php on lines 60..111

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

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/Http/RequestHandlers/PendingChangesAcceptChange.php and 1 other location - About 4 hrs to fix
app/Http/RequestHandlers/PendingChangesRejectChange.php on lines 1..65

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

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/Http/RequestHandlers/PendingChangesRejectChange.php and 1 other location - About 4 hrs to fix
app/Http/RequestHandlers/PendingChangesAcceptChange.php on lines 1..65

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

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

    protected function normalizeExceptions(): array
    {
        return [
            'C' . UTF8::COMBINING_CARON                => UTF8::LATIN_CAPITAL_LETTER_C_WITH_CARON,
            'C' . UTF8::COMBINING_CEDILLA              => UTF8::LATIN_CAPITAL_LETTER_C_WITH_ACUTE,
Severity: Major
Found in app/Module/LanguageSlovenian.php and 1 other location - About 3 hrs to fix
app/Module/LanguageSerbianLatin.php on lines 101..115

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

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

    protected function normalizeExceptions(): array
    {
        return [
            'C' . UTF8::COMBINING_CARON                => UTF8::LATIN_CAPITAL_LETTER_C_WITH_CARON,
            'C' . UTF8::COMBINING_CEDILLA              => UTF8::LATIN_CAPITAL_LETTER_C_WITH_ACUTE,
Severity: Major
Found in app/Module/LanguageSerbianLatin.php and 1 other location - About 3 hrs to fix
app/Module/LanguageSlovenian.php on lines 98..112

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

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 const ALL_EVENTS = [
        'ADOP' => 'INDI:ADOP',
        'ANUL' => 'FAM:ANUL',
        'BAPM' => 'INDI:BAPM',
        'BARM' => 'INDI:BARM',
Severity: Major
Found in app/Module/OnThisDayModule.php and 1 other location - About 3 hrs to fix
app/Module/UpcomingAnniversariesModule.php on lines 65..96

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

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 const ALL_EVENTS = [
        'ADOP' => 'INDI:ADOP',
        'ANUL' => 'FAM:ANUL',
        'BAPM' => 'INDI:BAPM',
        'BARM' => 'INDI:BARM',
Severity: Major
Found in app/Module/UpcomingAnniversariesModule.php and 1 other location - About 3 hrs to fix
app/Module/OnThisDayModule.php on lines 55..86

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

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/Http/RequestHandlers/TreePageDefaultUpdate.php and 1 other location - About 3 hrs to fix
app/Http/RequestHandlers/UserPageDefaultUpdate.php on lines 1..62

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

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/Http/RequestHandlers/UserPageDefaultUpdate.php and 1 other location - About 3 hrs to fix
app/Http/RequestHandlers/TreePageDefaultUpdate.php on lines 1..62

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

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