fisharebest/webtrees

View on GitHub

Showing 1,726 of 2,403 total issues

Method handle has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $data_filesystem = Registry::filesystem()->data();

        $this->layout = 'layouts/administration';
Severity: Minor
Found in app/Http/RequestHandlers/CleanDataFolder.php - About 1 hr to fix

    Method handle has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function handle(ServerRequestInterface $request): ResponseInterface
        {
            $username  = Validator::parsedBody($request)->string('username');
            $real_name = Validator::parsedBody($request)->string('real_name');
            $email     = Validator::parsedBody($request)->string('email');
    Severity: Minor
    Found in app/Http/RequestHandlers/UserAddAction.php - About 1 hr to fix

      Method updateNames has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function updateNames(string $xref, int $ged_id, Individual $record): void
          {
              // Insert all new rows together
              $rows = [];
      
      
      Severity: Minor
      Found in app/Services/GedcomImportService.php - About 1 hr to fix

        Method columns has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function columns(): array
            {
                return [
                    new CensusColumnNull($this, 'Street', 'Street,avenue,road,etc'),
                    new CensusColumnNull($this, 'Number', 'House number (in cities and towns)'),
        Severity: Minor
        Found in app/Census/CensusOfUnitedStates1940.php - About 1 hr to fix

          Method init has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function init(string $code, bool $setup = false): void
              {
                  self::$locale = Locale::create($code);
          
                  // Load the translation file
          Severity: Minor
          Found in app/I18N.php - About 1 hr to fix

            Function drawComboChart has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              drawComboChart (elementId, data, options) {
                // Default chart options
                const defaults = {
                  title: '',
                  subtitle: '',
            Severity: Minor
            Found in resources/js/statistics.js - About 1 hr to fix

              Method tryContinue has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function tryContinue(Cursor $cursor, BlockContinueParserInterface $activeBlockParser): BlockContinue|null
                  {
                      $line = $cursor->getLine();
              
                      if ($line === CensusTableExtension::CA_SUFFIX) {
              Severity: Minor
              Found in app/CommonMark/CensusTableContinueParser.php - About 1 hr to fix

                Method normalizeExceptions has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    protected function normalizeExceptions(): array
                    {
                        return [
                            'A' . UTF8::COMBINING_CARON        => UTF8::LATIN_CAPITAL_LETTER_A_WITH_ACUTE,
                            'C' . UTF8::COMBINING_CARON        => UTF8::LATIN_CAPITAL_LETTER_C_WITH_CARON,
                Severity: Minor
                Found in app/Module/LanguageCzech.php - About 1 hr to fix

                  Method postAddIndividualAction has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function postAddIndividualAction(ServerRequestInterface $request): ResponseInterface
                      {
                          $tree   = Validator::attributes($request)->tree();
                          $xref   = Validator::parsedBody($request)->isXref()->string('xref');
                          $option = Validator::parsedBody($request)->string('option');
                  Severity: Minor
                  Found in app/Module/ClippingsCartModule.php - About 1 hr to fix

                    Method alphabet has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function alphabet(): array
                        {
                            return [
                                UTF8::CYRILLIC_CAPITAL_LETTER_A,
                                UTF8::CYRILLIC_CAPITAL_LETTER_BE,
                    Severity: Minor
                    Found in app/Module/LanguageSerbian.php - About 1 hr to fix

                      Method all has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function all(bool $include_disabled = false): Collection
                          {
                              return Registry::cache()->array()->remember('all-modules', function (): Collection {
                                  // Modules have a default status, order etc.
                                  // We can override these from database settings.
                      Severity: Minor
                      Found in app/Services/ModuleService.php - About 1 hr to fix

                        Method createHeader has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function createHeader(Tree $tree, string $encoding, bool $include_sub): string
                            {
                                // Force a ".ged" suffix
                                $filename = $tree->name();
                        
                        
                        Severity: Minor
                        Found in app/Services/GedcomExportService.php - About 1 hr to fix

                          Method handle has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function handle(ServerRequestInterface $request): ResponseInterface
                              {
                                  $tree               = Validator::attributes($request)->tree();
                                  $keep_media         = Validator::parsedBody($request)->boolean('keep_media', false);
                                  $word_wrapped_notes = Validator::parsedBody($request)->boolean('WORD_WRAPPED_NOTES', false);
                          Severity: Minor
                          Found in app/Http/RequestHandlers/ImportGedcomAction.php - About 1 hr to fix

                            Method handle has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function handle(ServerRequestInterface $request): ResponseInterface
                                {
                                    $tree     = Validator::attributes($request)->tree();
                                    $xref     = Validator::attributes($request)->isXref()->string('xref');
                                    $record   = Registry::gedcomRecordFactory()->make($xref, $tree);
                            Severity: Minor
                            Found in app/Http/RequestHandlers/EditRawRecordAction.php - About 1 hr to fix

                              Method handle has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function handle(ServerRequestInterface $request): ResponseInterface
                                  {
                                      $tree   = Validator::attributes($request)->tree();
                                      $xref   = Validator::attributes($request)->isXref()->string('xref');
                                      $family = Registry::familyFactory()->make($xref, $tree);
                              Severity: Minor
                              Found in app/Http/RequestHandlers/AddSpouseToFamilyAction.php - About 1 hr to fix

                                Method handle has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function handle(ServerRequestInterface $request): ResponseInterface
                                    {
                                        $this->layout = 'layouts/administration';
                                
                                        $user_id = Validator::queryParams($request)->integer('user_id');
                                Severity: Minor
                                Found in app/Http/RequestHandlers/UserEditPage.php - About 1 hr to fix

                                  Method chartDistribution has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function chartDistribution(
                                          string $chart_shows = 'world',
                                          string $chart_type = '',
                                          string $surname = ''
                                      ): string {
                                  Severity: Minor
                                  Found in app/Statistics/Google/ChartDistribution.php - About 1 hr to fix

                                    Method write has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function write(string $id, string $data): bool
                                        {
                                            $ip_address = Validator::attributes($this->request)->string('client-ip');
                                            $user_id    = (int) Auth::id();
                                            $now        = Registry::timestampFactory()->now();
                                    Severity: Minor
                                    Found in app/SessionDatabaseHandler.php - About 1 hr to fix

                                      Method columns has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function columns(): array
                                          {
                                              return [
                                                  new CensusColumnFullName($this, 'Name', 'Name'),
                                                  new CensusColumnSexMF($this, 'Sex', 'Sex'),
                                      Severity: Minor
                                      Found in app/Census/CensusOfCanada1901.php - About 1 hr to fix

                                        Method getTopNameAndCount has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            private function getTopNameAndCount(array $surns): array
                                            {
                                                $max_name  = 0;
                                                $count_per = 0;
                                                $top_name  = '';
                                        Severity: Minor
                                        Found in app/Statistics/Google/ChartCommonSurname.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language