fisharebest/webtrees

View on GitHub

Showing 1,726 of 2,403 total issues

Method search has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    protected function search(Tree $tree, string $query, int $offset, int $limit, string $at): Collection
Severity: Minor
Found in app/Http/RequestHandlers/TomSelectSharedNote.php - About 35 mins to fix

    Method search has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        protected function search(Tree $tree, string $query, int $offset, int $limit, string $at): Collection
    Severity: Minor
    Found in app/Http/RequestHandlers/TomSelectLocation.php - About 35 mins to fix

      Method search has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          protected function search(Tree $tree, string $query, int $offset, int $limit, string $at): Collection
      Severity: Minor
      Found in app/Http/RequestHandlers/TomSelectPlace.php - About 35 mins to fix

        Method search has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            protected function search(Tree $tree, string $query, int $offset, int $limit, string $at): Collection
        Severity: Minor
        Found in app/Http/RequestHandlers/TomSelectSource.php - About 35 mins to fix

          Method search has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              abstract protected function search(Tree $tree, string $query, int $offset, int $limit, string $at): Collection;
          Severity: Minor
          Found in app/Http/RequestHandlers/AbstractTomSelectHandler.php - About 35 mins to fix

            Method search has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                protected function search(Tree $tree, string $query, int $offset, int $limit, string $at): Collection
            Severity: Minor
            Found in app/Http/RequestHandlers/TomSelectSubmitter.php - About 35 mins to fix

              Method search has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  protected function search(Tree $tree, string $query, int $offset, int $limit, string $at): Collection
              Severity: Minor
              Found in app/Http/RequestHandlers/TomSelectNote.php - About 35 mins to fix

                Method handleQuery has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function handleQuery(ServerRequestInterface $request, Builder $query, array $search_columns, array $sort_columns, Closure $callback): ResponseInterface
                Severity: Minor
                Found in app/Services/DatatablesService.php - About 35 mins to fix

                  Method paginateQuery has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      private function paginateQuery(Builder $query, Closure $row_mapper, Closure $row_filter, int $offset, int $limit): Collection
                  Severity: Minor
                  Found in app/Services/SearchService.php - About 35 mins to fix

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

                            CaptchaService $captcha_service,
                            EmailService $email_service,
                            MessageService $message_service,
                            RateLimitService $rate_limit_service,
                            UserService $user_service
                    Severity: Minor
                    Found in app/Http/RequestHandlers/ContactAction.php - About 35 mins to fix

                      Method searchIndividualsPhonetic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          public function searchIndividualsPhonetic(string $soundex, string $lastname, string $firstname, string $place, array $search_trees): Collection
                      Severity: Minor
                      Found in app/Services/SearchService.php - About 35 mins to fix

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

                            public function __construct(int $hue, int $saturation, int $lightness, float $alpha, int $range)
                        Severity: Minor
                        Found in app/ColorGenerator.php - About 35 mins to fix

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

                                  string $label,
                                  string $link = '#',
                                  string $class = '',
                                  array $attrs = [],
                                  array $submenus = []
                          Severity: Minor
                          Found in app/Menu.php - About 35 mins to fix

                            Method thumbnailResponse has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    FilesystemOperator $filesystem,
                                    string $path,
                                    int $width,
                                    int $height,
                                    string $fit
                            Severity: Minor
                            Found in app/Contracts/ImageFactoryInterface.php - About 35 mins to fix

                              Method mediaFileThumbnailResponse has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      MediaFile $media_file,
                                      int $width,
                                      int $height,
                                      string $fit,
                                      bool $add_watermark
                              Severity: Minor
                              Found in app/Contracts/ImageFactoryInterface.php - About 35 mins to fix

                                Method commonGivenQuery has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    private function commonGivenQuery(string $sex, string $type, bool $show_tot, int $threshold, int $maxtoshow)
                                Severity: Minor
                                Found in app/Statistics/Repository/IndividualRepository.php - About 35 mins to fix

                                  Method commonSurnamesQuery has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          string $type,
                                          bool $show_tot,
                                          int $threshold,
                                          int $number_of_surnames,
                                          string $sorting
                                  Severity: Minor
                                  Found in app/Statistics/Repository/IndividualRepository.php - About 35 mins to fix

                                    Function fillYData has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        private function fillYData($x, $z, $value, array $x_axis, array $z_axis, array &$ydata): void
                                        {
                                            $x = $this->findAxisEntry($x, $x_axis);
                                            $z = $this->findAxisEntry($z, $z_axis);
                                    
                                    
                                    Severity: Minor
                                    Found in app/Module/StatisticsChartModule.php - About 35 mins to fix

                                    Cognitive Complexity

                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                    A method's cognitive complexity is based on a few simple rules:

                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                    • Code is considered more complex for each "break in the linear flow of the code"
                                    • Code is considered more complex when "flow breaking structures are nested"

                                    Further reading

                                    Function canShow has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public function canShow(int|null $access_level = null): bool
                                        {
                                            $access_level ??= Auth::accessLevel($this->record->tree());
                                    
                                            // Does this record have an explicit restriction notice?
                                    Severity: Minor
                                    Found in app/Fact.php - About 35 mins to fix

                                    Cognitive Complexity

                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                    A method's cognitive complexity is based on a few simple rules:

                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                    • Code is considered more complex for each "break in the linear flow of the code"
                                    • Code is considered more complex when "flow breaking structures are nested"

                                    Further reading

                                    Function getFooter has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public function getFooter(ServerRequestInterface $request): string
                                        {
                                            $tree = Validator::attributes($request)->treeOptional();
                                    
                                            if ($tree === null) {
                                    Severity: Minor
                                    Found in app/Module/ContactsFooterModule.php - About 35 mins to fix

                                    Cognitive Complexity

                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                    A method's cognitive complexity is based on a few simple rules:

                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                    • Code is considered more complex for each "break in the linear flow of the code"
                                    • Code is considered more complex when "flow breaking structures are nested"

                                    Further reading

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language