fisharebest/webtrees

View on GitHub
app/Census/Census.php

Summary

Maintainability
C
7 hrs
Test Coverage

Method censusPlaces has 129 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 5 hrs 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 CensusOfRhodeIsland(),
                          new CensusOfCanada(),
                          new CensusOfCzechRepublic(),
      Severity: Major
      Found in app/Census/Census.php - About 30 mins 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 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 CensusOfUnitedStates(),
                                new CensusOfRhodeIsland(),
                                new CensusOfEngland(),
                                new CensusOfScotland(),
            Severity: Major
            Found in app/Census/Census.php - About 30 mins to fix

              There are no issues that match your filters.

              Category
              Status