ernestwisniewski/kbin

View on GitHub

Showing 226 of 573 total issues

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

        UserEdit $userEdit,
        UserFactory $userFactory,
        ValidatorInterface $validator,
        UserFactory $factory,
        RateLimiterFactory $apiUpdateLimiter
Severity: Minor
Found in src/Controller/Api/User/UserUpdateApi.php - About 35 mins to fix

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

            #[MapEntity(id: 'comment_id')]
            PostComment $comment,
            PostCommentEdit $postCommentEdit,
            PostCommentFactory $factory,
            ValidatorInterface $validator,
    Severity: Minor
    Found in src/Controller/Api/Post/Comments/PostCommentsUpdateApi.php - About 35 mins to fix

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

              #[MapEntity(id: 'entry_id')]
              Entry $entry,
              EntryFactory $factory,
              EventDispatcherInterface $dispatcher,
              RateLimiterFactory $apiReadLimiter,
      Severity: Minor
      Found in src/Controller/Api/Entry/EntriesRetrieveApi.php - About 35 mins to fix

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

                #[MapEntity(id: 'magazine_id')]
                Magazine $magazine,
                ValidatorInterface $validator,
                EntryCreate $entryCreate,
                EntryFactory $entryFactory,
        Severity: Minor
        Found in src/Controller/Api/Entry/MagazineEntryCreateApi.php - About 35 mins to fix

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

                  #[MapEntity(id: 'domain_id')]
                  Domain $domain,
                  EntryCommentRepository $repository,
                  RequestStack $request,
                  RateLimiterFactory $apiReadLimiter,
          Severity: Minor
          Found in src/Controller/Api/Entry/Comments/DomainEntryCommentsRetrieveApi.php - About 35 mins to fix

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

                    string $email = null,
                    string $username = null,
                    string $url = null,
                    bool $isActive = false,
                    User $user = null
            Severity: Minor
            Found in src/Kbin/Donor/DTO/DonorDto.php - About 35 mins to fix

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

                      int $magazineId = null,
                      int $userId = null,
                      string $username = null,
                      string $apId = null,
                      ImageDto $avatar = null
              Severity: Minor
              Found in src/Kbin/Magazine/DTO/MagazineModeratorResponseDto.php - About 35 mins to fix

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

                        #[MapEntity(id: 'comment_id')]
                        PostComment $comment,
                        int $choice,
                        VoteCreate $voteCreate,
                        PostCommentFactory $factory,
                Severity: Minor
                Found in src/Controller/Api/Post/Comments/PostCommentsVoteApi.php - About 35 mins to fix

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

                          EntryRepository $repository,
                          EntryFactory $factory,
                          RequestStack $request,
                          RateLimiterFactory $apiReadLimiter,
                          RateLimiterFactory $anonymousApiReadLimiter,
                  Severity: Minor
                  Found in src/Controller/Api/Entry/EntriesRetrieveApi.php - About 35 mins to fix

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

                            PostRepository $repository,
                            PostFactory $factory,
                            RequestStack $request,
                            RateLimiterFactory $apiReadLimiter,
                            RateLimiterFactory $anonymousApiReadLimiter
                    Severity: Minor
                    Found in src/Controller/Api/Post/PostsRetrieveApi.php - About 35 mins to fix

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

                              #[MapEntity(id: 'entry_id')]
                              Entry $entry,
                              int $choice,
                              VoteCreate $voteCreate,
                              EntryFactory $factory,
                      Severity: Minor
                      Found in src/Controller/Api/Entry/EntriesVoteApi.php - About 35 mins to fix

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

                                Entry|EntryComment|Post|PostComment|null $subject,
                                EntryFactory $entryFactory,
                                EntryCommentFactory $entryCommentFactory,
                                PostFactory $postFactory,
                                PostCommentFactory $postCommentFactory,
                        Severity: Minor
                        Found in src/Kbin/Magazine/DTO/MagazineLogResponseDto.php - About 35 mins to fix

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

                                  #[MapEntity(id: 'user_id')]
                                  User $user,
                                  EntryCommentRepository $repository,
                                  RequestStack $request,
                                  RateLimiterFactory $apiReadLimiter,
                          Severity: Minor
                          Found in src/Controller/Api/Entry/Comments/UserEntryCommentsRetrieveApi.php - About 35 mins to fix

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

                                    #[MapEntity(id: 'comment_id')]
                                    EntryComment $comment,
                                    int $choice,
                                    VoteCreate $voteCreate,
                                    EntryCommentFactory $factory,
                            Severity: Minor
                            Found in src/Controller/Api/Entry/Comments/EntryCommentsVoteApi.php - About 35 mins to fix

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

                                      #[MapEntity(id: 'comment_id')]
                                      EntryComment $comment,
                                      EntryCommentEdit $entryCommentEdit,
                                      EntryCommentFactory $factory,
                                      ValidatorInterface $validator,
                              Severity: Minor
                              Found in src/Controller/Api/Entry/Comments/EntryCommentsUpdateApi.php - About 35 mins to fix

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

                                        MagazineSmallResponseDto $magazine,
                                        UserSmallResponseDto $moderator,
                                        \DateTimeImmutable $createdAt,
                                        string $type,
                                        MagazineBanResponseDto $subject = null,
                                Severity: Minor
                                Found in src/Kbin/Magazine/DTO/MagazineLogResponseDto.php - About 35 mins to fix

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

                                          #[MapEntity(id: 'entry_id')]
                                          Entry $entry,
                                          EntryEdit $entryEdit,
                                          EntryFactory $entryFactory,
                                          ValidatorInterface $validator,
                                  Severity: Minor
                                  Found in src/Controller/Api/Entry/EntriesUpdateApi.php - About 35 mins to fix

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

                                        connect() {
                                            if (!this.element.firstElementChild.classList.contains('comment')) {
                                                return;
                                            }
                                    
                                    
                                    Severity: Minor
                                    Found in assets/controllers/comments_wrap_controller.js - 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 showModPanel has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        async showModPanel(event) {
                                            event.preventDefault();
                                    
                                            let container = this.element.nextElementSibling && this.element.nextElementSibling.classList.contains('js-container') ? this.element.nextElementSibling : null;
                                            if (null === container) {
                                    Severity: Minor
                                    Found in assets/controllers/subject_controller.js - 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 validate has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        #[Assert\Callback]
                                        public function validate(
                                            ExecutionContextInterface $context,
                                            $payload
                                        ) {
                                    Severity: Minor
                                    Found in src/DTO/OAuth2ClientDto.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