fisharebest/webtrees

View on GitHub

Showing 1,726 of 2,403 total issues

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

    public function alphabet(): array
    {
        return [
            'A',
            'B',
Severity: Minor
Found in app/Module/LanguageDutch.php - About 1 hr to fix

    Method postAdminEditAction has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function postAdminEditAction(ServerRequestInterface $request): ResponseInterface
        {
            $tree        = Validator::attributes($request)->tree();
            $block_id    = Validator::queryParams($request)->integer('block_id', 0);
            $xref        = Validator::parsedBody($request)->string('xref');
    Severity: Minor
    Found in app/Module/StoriesModule.php - About 1 hr to fix

      Method leafletJsTileLayers has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function leafletJsTileLayers(): array
          {
              return [
                  (object) [
                      'attribution' => 'Map data ©<a href="https://www.openstreetmap.org">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0">CC-BY-SA</a>',
      Severity: Minor
      Found in app/Module/OpenStreetMap.php - About 1 hr to fix

        Method delete has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function delete(Tree $tree): void
            {
                // If this is the default tree, then unset it
                if (Site::getPreference('DEFAULT_GEDCOM') === $tree->name()) {
                    Site::setPreference('DEFAULT_GEDCOM', '');
        Severity: Minor
        Found in app/Services/TreeService.php - About 1 hr to fix

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

              public function handle(ServerRequestInterface $request): ResponseInterface
              {
                  $tree  = Validator::attributes($request)->treeOptional();
                  $email = Validator::parsedBody($request)->string('email');
                  $user  = $this->user_service->findByEmail($email);
          Severity: Minor
          Found in app/Http/RequestHandlers/PasswordRequestAction.php - About 1 hr to fix

            Method handle has 29 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');
                    $individual = Registry::individualFactory()->make($xref, $tree);
            Severity: Minor
            Found in app/Http/RequestHandlers/AddChildToIndividualPage.php - About 1 hr to fix

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

                  public function handle(ServerRequestInterface $request): ResponseInterface
                  {
                      $tree        = Validator::attributes($request)->tree();
                      $name        = Validator::parsedBody($request)->isNotEmpty()->string('name');
                      $address     = Validator::parsedBody($request)->string('address');
              Severity: Minor
              Found in app/Http/RequestHandlers/CreateRepositoryAction.php - About 1 hr to fix

                Method gedcomDiff has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function gedcomDiff(Tree $tree, string $old_gedcom, string $new_gedcom): string
                    {
                        $old_lines   = explode("\n", $old_gedcom);
                        $new_lines   = explode("\n", $new_gedcom);
                        $algorithm   = new MyersDiff();
                Severity: Minor
                Found in app/Services/DataFixService.php - About 1 hr to fix

                  Method handle has 29 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/AccountEdit.php - About 1 hr to fix

                    Method handle has 29 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/GedcomRecordPage.php - About 1 hr to fix

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

                          public function handle(ServerRequestInterface $request): ResponseInterface
                          {
                              $this->layout = 'layouts/administration';
                      
                              $custom_family_tags      = explode(',', Site::getPreference('CUSTOM_FAMILY_TAGS'));
                      Severity: Minor
                      Found in app/Http/RequestHandlers/SiteTagsPage.php - About 1 hr to fix

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

                            public function columns(): array
                            {
                                return [
                                    new CensusColumnNull($this, 'Lfd.Nr.', 'Laufende Nummer'),
                                    new CensusColumnGivenNames($this, 'Vorname', 'Vorname'),
                        Severity: Minor
                        Found in app/Census/CensusOfDeutschland1900.php - About 1 hr to fix

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

                              public function columns(): array
                              {
                                  return [
                                      new CensusColumnNull($this, 'Č. b.', 'Radové číslo bytu'),
                                      new CensusColumnNull($this, 'Č. os.', 'Radové číslo osôb v dome'),
                          Severity: Minor
                          Found in app/Census/CensusOfSlovakia1930.php - About 1 hr to fix

                            Method setup has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function setup(): void
                                {
                                    parent::setup();
                            
                                    $this->tcpdf = new TcpdfWrapper(
                            Severity: Minor
                            Found in app/Report/PdfRenderer.php - About 1 hr to fix

                              Method ageBetweenSiblingsQuery has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

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

                                Method __construct has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function __construct(string $report)
                                    {
                                        $this->xml_parser = xml_parser_create();
                                
                                        xml_parser_set_option($this->xml_parser, XML_OPTION_CASE_FOLDING, 0);
                                Severity: Minor
                                Found in app/Report/ReportParserBase.php - About 1 hr to fix

                                  Method statsMarrAgeQuery has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function statsMarrAgeQuery(string $sex, int $year1 = -1, int $year2 = -1): array
                                      {
                                          $query = DB::table('dates AS married')
                                              ->join('families', static function (JoinClause $join): void {
                                                  $join
                                  Severity: Minor
                                  Found in app/Statistics/Repository/FamilyRepository.php - About 1 hr to fix

                                    Function autocomplete has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      webtrees.autocomplete = function (selector) {
                                        // Use typeahead/bloodhound for autocomplete
                                        $(selector).each(function () {
                                          const that = this;
                                          $(this).typeahead(null, {
                                    Severity: Minor
                                    Found in resources/js/webtrees.js - About 1 hr to fix

                                      Function init has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        init (locale) {
                                          if (this.loading || this.initialized) {
                                            return;
                                          }
                                      
                                      
                                      Severity: Minor
                                      Found in resources/js/statistics.js - About 1 hr to fix

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

                                            public function editBlockConfiguration(Tree $tree, int $block_id): string
                                            {
                                                $default_events = implode(',', self::DEFAULT_EVENTS);
                                        
                                                $filter     = $this->getBlockSetting($block_id, 'filter', '1');
                                        Severity: Minor
                                        Found in app/Module/OnThisDayModule.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language