fisharebest/webtrees

View on GitHub

Showing 1,726 of 2,403 total issues

Method drawChildren has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function drawChildren(Collection $familyList, int $gen = 1, bool $ajax = false): string
    {
        $html          = '';
        $children2draw = [];
        $f2load        = [];
Severity: Minor
Found in app/Module/InteractiveTree/TreeView.php - About 1 hr to fix

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

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

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

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

        Method downloadResponse has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function downloadResponse(
                Tree $tree,
                bool $sort_by_xref,
                string $encoding,
                string $privacy,
        Severity: Minor
        Found in app/Services/GedcomExportService.php - About 1 hr to fix

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

            Method config has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function config(): object
                {
                    $default = 'openstreetmap';
            
                    $map_providers = $this->module_service
            Severity: Minor
            Found in app/Services/LeafletJsService.php - About 1 hr to fix

              Method connectToDatabase has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function connectToDatabase(array $data): void
                  {
                      // Try to create the database, if it does not already exist.
                      switch ($data['dbtype']) {
                          case DB::SQLITE:
              Severity: Minor
              Found in app/Http/RequestHandlers/SetupWizard.php - About 1 hr to fix

                Method unhandledExceptionResponse has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function unhandledExceptionResponse(ServerRequestInterface $request, Throwable $exception): ResponseInterface
                    {
                        $this->layout = 'layouts/default';
                
                        // Create a stack dump for the exception
                Severity: Minor
                Found in app/Http/Middleware/HandleExceptions.php - About 1 hr to fix

                  Method handle has 34 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('submitter_name');
                          $address     = Validator::parsedBody($request)->string('submitter_address');
                  Severity: Minor
                  Found in app/Http/RequestHandlers/CreateSubmitterAction.php - About 1 hr to fix

                    Method columns has 34 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-10', 'Free white males 0-10 years'),
                    Severity: Minor
                    Found in app/Census/CensusOfUnitedStates1820.php - About 1 hr to fix

                      Method canShowByType has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          protected function canShowByType(int $access_level): bool
                          {
                              // Dead people...
                              if ((int) $this->tree->getPreference('SHOW_DEAD_PEOPLE') >= $access_level && $this->isDead()) {
                                  $keep_alive             = false;
                      Severity: Minor
                      Found in app/Individual.php - About 1 hr to fix

                        Method connect has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public static function connect(
                                #[SensitiveParameter]
                                string $driver,
                                #[SensitiveParameter]
                                string $host,
                        Severity: Minor
                        Found in app/DB.php - About 1 hr to fix

                          Method render has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function render($renderer): void
                              {
                                  static $lastpicbottom, $lastpicpage, $lastpicleft, $lastpicright;
                          
                                  // Get the current positions
                          Severity: Minor
                          Found in app/Report/ReportHtmlImage.php - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                                    if ($this->process_footnote && ($this->process_ifs === 0 || $name === 'if') && ($this->process_gedcoms === 0 || $name === 'Gedcom') && ($this->process_repeats === 0 || $name === 'Facts' || $name === 'RepeatTag')) {
                                        $method = $name . 'StartHandler';
                            
                                        if (method_exists($this, $method)) {
                                            $this->{$method}($attrs);
                            Severity: Critical
                            Found in app/Report/ReportParserGenerate.php - About 1 hr to fix

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

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

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

                                    public static function sortFacts(Collection $unsorted): Collection
                                    {
                                        $dated    = [];
                                        $nondated = [];
                                        $sorted   = [];
                                Severity: Minor
                                Found in app/Fact.php - About 1 hr to fix

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

                                      public static function typeComparator(): Closure
                                      {
                                          static $factsort = [];
                                  
                                          if ($factsort === []) {
                                  Severity: Minor
                                  Found in app/Fact.php - About 1 hr to fix

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

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

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

                                          public function allMediaFolders(FilesystemOperator $data_filesystem): Collection
                                          {
                                              $db_folders = DB::table('media_file')
                                                  ->leftJoin('gedcom_setting', static function (JoinClause $join): void {
                                                      $join
                                      Severity: Minor
                                      Found in app/Services/MediaFileService.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
                                            {
                                                $tree     = Validator::attributes($request)->tree();
                                                $user     = Validator::attributes($request)->user();
                                                $ip       = Validator::attributes($request)->string('client-ip');
                                        Severity: Minor
                                        Found in app/Http/RequestHandlers/MessageAction.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language