pixelfed/pixelfed

View on GitHub

Showing 1,326 of 1,561 total issues

Avoid too many return statements within this method.
Open

        return '<span class="border border-success px-3 py-1 rounded text-white font-weight-bold">Open</span>';
Severity: Major
Found in app/Models/CuratedRegister.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                    return Storage::url($path);
    Severity: Major
    Found in app/Profile.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return $url;
      Severity: Major
      Found in app/Profile.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                    return '<span class="border border-muted px-3 py-1 rounded text-white font-weight-bold" style="opacity:0.5">Closed</span>';
        Severity: Major
        Found in app/Models/CuratedRegister.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  return $hugeMode ?
                      $this->hugeMode($minId, $limit, $log) :
                      $this->regularMode($minId, $limit, $log);
          Severity: Major
          Found in app/Console/Commands/MediaS3GarbageCollector.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    return Command::SUCCESS;
            Severity: Major
            Found in app/Console/Commands/CloudMediaMigrate.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                          return Command::SUCCESS;
              Severity: Major
              Found in app/Console/Commands/SendUpdateActor.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                        return 0;
                Severity: Major
                Found in app/Console/Commands/GenerateInstanceActor.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                              return;
                  Severity: Major
                  Found in app/Console/Commands/UserRegistrationMagicLink.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                return;
                    Severity: Major
                    Found in app/Console/Commands/UserRegistrationMagicLink.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                      return $avatar->remote_url;
                      Severity: Major
                      Found in app/Profile.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                return Command::SUCCESS;
                        Severity: Major
                        Found in app/Console/Commands/UserRegistrationMagicLink.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                          return $this->banInstance();
                          Severity: Major
                          Found in app/Console/Commands/InstanceManager.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                            return;
                            Severity: Major
                            Found in app/Console/Commands/SendUpdateActor.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                          return url(Storage::url($path));
                              Severity: Major
                              Found in app/Profile.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                        return $domain;
                                Severity: Major
                                Found in app/Console/Commands/AddUserDomainBlock.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                  return $query->where('id', '>', $startCache);
                                  Severity: Major
                                  Found in app/Console/Commands/SendUpdateActor.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                            return Command::SUCCESS;
                                    Severity: Major
                                    Found in app/Console/Commands/SendUpdateActor.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                              return 0;
                                      Severity: Major
                                      Found in app/Console/Commands/FixStatusCount.php - About 30 mins to fix

                                        Function handleAnnounceActivity has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                            public function handleAnnounceActivity()
                                            {
                                                $actor = $this->actorFirstOrCreate($this->payload['actor']);
                                                $activity = $this->payload['object'];
                                        
                                        
                                        Severity: Minor
                                        Found in app/Util/ActivityPub/Inbox.php - About 25 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