fisharebest/webtrees

View on GitHub

Showing 1,726 of 2,403 total issues

Method handleQuery has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function handleQuery(ServerRequestInterface $request, Builder $query, array $search_columns, array $sort_columns, Closure $callback): ResponseInterface
    {
        $search = Validator::queryParams($request)->array('search')['value'] ?? '';
        $start  = Validator::queryParams($request)->integer('start', 0);
        $length = Validator::queryParams($request)->integer('length', 0);
Severity: Minor
Found in app/Services/DatatablesService.php - About 1 hr to fix

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

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

      Method topTenGrandFamilyQuery has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function topTenGrandFamilyQuery(int $total): array
          {
              return DB::table('families')
                  ->join('link AS children', static function (JoinClause $join): void {
                      $join
      Severity: Minor
      Found in app/Statistics/Repository/FamilyRepository.php - About 1 hr to fix

        Method createTextBox has 12 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                float $width,
                float $height,
                bool $border,
                string $bgcolor,
                bool $newline,
        Severity: Major
        Found in app/Report/AbstractRenderer.php - About 1 hr to fix

          Method createTextBox has 12 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  float $width,
                  float $height,
                  bool $border,
                  string $bgcolor,
                  bool $newline,
          Severity: Major
          Found in app/Report/PdfRenderer.php - About 1 hr to fix

            Method createTextBox has 12 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    float $width,
                    float $height,
                    bool $border,
                    string $bgcolor,
                    bool $newline,
            Severity: Major
            Found in app/Report/HtmlRenderer.php - About 1 hr to fix

              Method __construct has 12 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      float $width,
                      float $height,
                      bool $border,
                      string $bgcolor,
                      bool $newline,
              Severity: Major
              Found in app/Report/ReportBaseTextbox.php - About 1 hr to fix

                Method target has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function target()
                    {
                        if (!preg_match('/^@(' . Gedcom::REGEX_XREF . ')@$/', $this->value(), $match)) {
                            return null;
                        }
                Severity: Minor
                Found in app/Fact.php - About 1 hr to fix

                  Method individualBoxFacts has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function individualBoxFacts(Individual $individual): string
                      {
                          $html = '';
                  
                          $opt_tags = preg_split('/\W/', $individual->tree()->getPreference('CHART_BOX_TAGS'), 0, PREG_SPLIT_NO_EMPTY);
                  Severity: Minor
                  Found in app/Module/ModuleThemeTrait.php - About 1 hr to fix

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

                        public function getBlock(Tree $tree, int $block_id, string $context, array $config = []): string
                        {
                            $gedcomid   = $tree->getUserPreference(Auth::user(), UserInterface::PREF_TREE_ACCOUNT_XREF);
                            $individual = Registry::individualFactory()->make($gedcomid, $tree);
                            $links      = [];
                    Severity: Minor
                    Found in app/Module/UserWelcomeModule.php - About 1 hr to fix

                      Method loadIndividuals has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function loadIndividuals(Tree $tree, string $surname, bool $soundex_dm, bool $soundex_std): array
                          {
                              $individuals = DB::table('individuals')
                                  ->join('name', static function (JoinClause $join): void {
                                      $join
                      Severity: Minor
                      Found in app/Module/BranchesListModule.php - About 1 hr to fix

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

                            public function getBlock(Tree $tree, int $block_id, string $context, array $config = []): string
                            {
                                $messages = DB::table('message')
                                    ->where('user_id', '=', Auth::id())
                                    ->orderByDesc('message_id')
                        Severity: Minor
                        Found in app/Module/UserMessagesModule.php - About 1 hr to fix

                          Method create has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function create(string $name, string $title): Tree
                              {
                                  DB::table('gedcom')->insert([
                                      'gedcom_name' => $name,
                                  ]);
                          Severity: Minor
                          Found in app/Services/TreeService.php - About 1 hr to fix

                            Method getEventsList has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function getEventsList(int $jd1, int $jd2, string $events, bool $only_living, string $sort_by, Tree $tree): Collection
                                {
                                    $found_facts = [];
                                    $facts       = new Collection();
                            
                            
                            Severity: Minor
                            Found in app/Services/CalendarService.php - About 1 hr to fix

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

                                Method updateUserBlocks has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function updateUserBlocks(int $user_id, Collection $main_block_ids, Collection $side_block_ids): void
                                    {
                                        $existing_block_ids = DB::table('block')
                                            ->where('user_id', '=', $user_id)
                                            ->whereIn('location', [ModuleBlockInterface::MAIN_BLOCKS, ModuleBlockInterface::SIDE_BLOCKS])
                                Severity: Minor
                                Found in app/Services/HomePageService.php - About 1 hr to fix

                                  Method updateTreeBlocks has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function updateTreeBlocks(int $tree_id, Collection $main_block_ids, Collection $side_block_ids): void
                                      {
                                          $existing_block_ids = DB::table('block')
                                              ->where('gedcom_id', '=', $tree_id)
                                              ->whereIn('location', [ModuleBlockInterface::MAIN_BLOCKS, ModuleBlockInterface::SIDE_BLOCKS])
                                  Severity: Minor
                                  Found in app/Services/HomePageService.php - About 1 hr to fix

                                    Method chartChildren has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function chartChildren(): string
                                        {
                                            $data = [
                                                [
                                                    I18N::translate('Century'),
                                    Severity: Minor
                                    Found in app/Statistics/Google/ChartChildren.php - About 1 hr to fix

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

                                          public function columns(): array
                                          {
                                              return [
                                                  new CensusColumnFullName($this, 'Name', 'Name of each person in family, household or institution'),
                                                  new CensusColumnNull($this, 'Address', 'Place of Habitation'),
                                      Severity: Minor
                                      Found in app/Census/CensusOfCanada1911.php - About 1 hr to fix

                                        Method factsStartHandler has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            protected function factsStartHandler(array $attrs): void
                                            {
                                                $this->process_repeats++;
                                                if ($this->process_repeats > 1) {
                                                    return;
                                        Severity: Minor
                                        Found in app/Report/ReportParserGenerate.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language