fisharebest/webtrees

View on GitHub
app/Census/Census.php

Summary

Maintainability
C
7 hrs
Test Coverage

Method censusPlaces has 120 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function censusPlaces(string $locale): array
    {
        switch ($locale) {
            case 'cs':
                return [
Severity: Major
Found in app/Census/Census.php - About 4 hrs to fix

    Avoid too many return statements within this method.
    Open

                    return [
                        new CensusOfFrance(),
                        new CensusOfCanada(),
                        new CensusOfCzechRepublic(),
                        new CensusOfDenmark(),
    Severity: Major
    Found in app/Census/Census.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return [
                          new CensusOfUnitedStates(),
                          new CensusOfEngland(),
                          new CensusOfScotland(),
                          new CensusOfWales(),
      Severity: Major
      Found in app/Census/Census.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                        return [
                            new CensusOfCanada(),
                            new CensusOfFrance(),
                            new CensusOfCzechRepublic(),
                            new CensusOfDenmark(),
        Severity: Major
        Found in app/Census/Census.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return [
                              new CensusOfSlovakia(),
                              new CensusOfCzechRepublic(),
                              new CensusOfDenmark(),
                              new CensusOfDeutschland(),
          Severity: Major
          Found in app/Census/Census.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return [
                                new CensusOfUnitedStates(),
                                new CensusOfCanada(),
                                new CensusOfCzechRepublic(),
                                new CensusOfDenmark(),
            Severity: Major
            Found in app/Census/Census.php - About 30 mins to fix

              There are no issues that match your filters.

              Category
              Status