fisharebest/webtrees

View on GitHub

Showing 1,726 of 2,403 total issues

Method handle has 43 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');
        $slug       = Validator::attributes($request)->string('slug', '');
Severity: Minor
Found in app/Http/RequestHandlers/IndividualPage.php - About 1 hr to fix

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

        public function handle(ServerRequestInterface $request): ResponseInterface
        {
            $tree = Validator::attributes($request)->treeOptional();
            $user = Validator::attributes($request)->user();
    
    
    Severity: Minor
    Found in app/Http/RequestHandlers/LoginPage.php - About 1 hr to fix

      Method getPlaceListLocation has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getPlaceListLocation(int|null $parent_id): Collection
          {
              $prefix = DB::prefix();
      
              $expression =
      Severity: Minor
      Found in app/Services/MapDataService.php - About 1 hr to fix

        Method sanitize has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function sanitize(string $html): string
            {
                $config = HTMLPurifier_Config::createDefault();
        
                $config->set('Cache.DefinitionImpl', null);
        Severity: Minor
        Found in app/Services/HtmlService.php - About 1 hr to fix

          Method process has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
              {
                  // Fatal errors.  We may be out of memory, so do not create any variables.
                  register_shutdown_function(static function (): void {
                      if (error_get_last() !== null && error_get_last()['type'] & E_ERROR) {
          Severity: Minor
          Found in app/Http/Middleware/HandleExceptions.php - About 1 hr to fix

            Method logsQuery has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function logsQuery(ServerRequestInterface $request): Builder
                {
                    $tree     = Validator::queryParams($request)->string('tree');
                    $from     = Validator::queryParams($request)->string('from');
                    $to       = Validator::queryParams($request)->string('to');
            Severity: Minor
            Found in app/Services/SiteLogsService.php - About 1 hr to fix

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

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

                Method webtreesTags has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function webtreesTags(): array
                    {
                        return [
                            'FAM:CHAN:_WT_USER'           => new WebtreesUser(I18N::translate('Author of last change')),
                            'FAM:*:_ASSO'                 => new XrefAssociate(I18N::translate('Associate')),
                Severity: Minor
                Found in app/Gedcom.php - About 1 hr to fix

                  Method lineStartHandler has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      protected function lineStartHandler(array $attrs): void
                      {
                          // Start horizontal position, current position (default)
                          $x1 = ReportBaseElement::CURRENT_POSITION;
                          if (isset($attrs['x1'])) {
                  Severity: Minor
                  Found in app/Report/ReportParserGenerate.php - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                                if (($rel1 === 'HUSB' || $rel1 === 'WIFE') && ($rel2 === 'HUSB' || $rel2 === 'WIFE')) {
                                    $relationships[$i] = $spouse_codes[$next->sex()] ?? $spouse_codes['U'];
                                } elseif (($rel1 === 'HUSB' || $rel1 === 'WIFE') && $rel2 === 'CHIL') {
                                    $relationships[$i] = $child_codes[$next->sex()] ?? $child_codes['U'];
                                } elseif ($rel1 === 'CHIL' && ($rel2 === 'HUSB' || $rel2 === 'WIFE')) {
                    Severity: Critical
                    Found in app/Module/RelationshipsChartModule.php - About 1 hr to fix

                      Method handle has 41 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');
                              $user        = Validator::attributes($request)->user();
                      Severity: Minor
                      Found in app/Module/HourglassChartModule.php - About 1 hr to fix

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

                            public function handle(ServerRequestInterface $request): ResponseInterface
                            {
                                $user          = Validator::attributes($request)->user();
                                $active        = Validator::parsedBody($request)->string('SMTP_ACTIVE');
                                $disp_name     = Validator::parsedBody($request)->string('SMTP_DISP_NAME');
                        Severity: Minor
                        Found in app/Http/RequestHandlers/EmailPreferencesAction.php - About 1 hr to fix

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

                              public function columns(): array
                              {
                                  return [
                                      new CensusColumnFullName($this, 'Name', 'Name of head of family'),
                                      new CensusColumnNull($this, 'M0', 'Free white males 0-5 years'),
                          Severity: Minor
                          Found in app/Census/CensusOfUnitedStates1840.php - About 1 hr to fix

                            Method compare has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public static function compare(Date $a, Date $b): int
                                {
                                    // Get min/max JD for each date.
                                    switch ($a->qual1) {
                                        case 'BEF':
                            Severity: Minor
                            Found in app/Date.php - About 1 hr to fix

                              Method getBlock has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getBlock(Tree $tree, int $block_id, string $context, array $config = []): string
                                  {
                                      $show_other      = $this->getBlockSetting($block_id, 'show_other', self::DEFAULT_SHOW_OTHER);
                                      $show_unassigned = $this->getBlockSetting($block_id, 'show_unassigned', self::DEFAULT_SHOW_UNASSIGNED);
                                      $show_future     = $this->getBlockSetting($block_id, 'show_future', self::DEFAULT_SHOW_FUTURE);
                              Severity: Minor
                              Found in app/Module/ResearchTaskModule.php - About 1 hr to fix

                                Method saveBlockConfiguration has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function saveBlockConfiguration(ServerRequestInterface $request, int $block_id): void
                                    {
                                        $show_last_update     = Validator::parsedBody($request)->boolean('show_last_update', false);
                                        $show_common_surnames = Validator::parsedBody($request)->boolean('show_common_surnames', false);
                                        $number_of_surnames   = Validator::parsedBody($request)->integer('number_of_surnames');
                                Severity: Minor
                                Found in app/Module/FamilyTreeStatisticsModule.php - About 1 hr to fix

                                  Method editBlockConfiguration has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function editBlockConfiguration(Tree $tree, int $block_id): string
                                      {
                                          $show_last_update     = $this->getBlockSetting($block_id, 'show_last_update', '1');
                                          $show_common_surnames = $this->getBlockSetting($block_id, 'show_common_surnames', '1');
                                          $number_of_surnames   = $this->getBlockSetting($block_id, 'number_of_surnames', self::DEFAULT_NUMBER_OF_SURNAMES);
                                  Severity: Minor
                                  Found in app/Module/FamilyTreeStatisticsModule.php - About 1 hr to fix

                                    Method duplicateXrefs has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function duplicateXrefs(Tree $tree): array
                                        {
                                            $subquery1 = DB::table('individuals')
                                                ->where('i_file', '=', $tree->id())
                                                ->select(['i_id AS xref', new Expression("'INDI' AS type")])
                                    Severity: Minor
                                    Found in app/Services/AdminService.php - About 1 hr to fix

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

                                          public function handle(ServerRequestInterface $request): ResponseInterface
                                          {
                                              $tree = Validator::attributes($request)->treeOptional();
                                              $user = Validator::attributes($request)->user();
                                      
                                      
                                      Severity: Minor
                                      Found in app/Http/RequestHandlers/AccountUpdate.php - About 1 hr to fix

                                        Method insertMissingLevels has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            protected function insertMissingLevels(Tree $tree, string $tag, string $gedcom, bool $include_hidden): string
                                            {
                                                $next_level = substr_count($tag, ':') + 1;
                                                $factory    = Registry::elementFactory();
                                                $subtags    = $factory->make($tag)->subtags();
                                        Severity: Minor
                                        Found in app/Services/GedcomEditService.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language