pixelfed/pixelfed

View on GitHub

Showing 1,558 of 1,561 total issues

Avoid too many return statements within this method.
Open

                return $this->relistInstance();
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/CloudMediaMigrate.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return url('/storage/avatars/default.jpg');
      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-info px-3 py-1 rounded text-white font-weight-bold">Awaiting User Response</span>';
        Severity: Major
        Found in app/Models/CuratedRegister.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return $this->unbanInstance();
          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/UserRegistrationMagicLink.php - About 30 mins to fix

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                  protected function createPreviousEdit($status)
                  {
                      if (! $status->edits()->count()) {
                          StatusEdit::create([
                              'status_id' => $status->id,
              Severity: Minor
              Found in app/Jobs/StatusPipeline/StatusRemoteUpdatePipeline.php and 1 other location - About 30 mins to fix
              app/Services/Status/UpdateStatusService.php on lines 107..120

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 90.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Avoid too many return statements within this method.
              Open

                              return url('/storage/avatars/default.jpg');
              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-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

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                      public static function createPreviousEdit(Status $status)
                      {
                          if(!$status->edits()->count()) {
                              StatusEdit::create([
                                  'status_id' => $status->id,
                  Severity: Minor
                  Found in app/Services/Status/UpdateStatusService.php and 1 other location - About 30 mins to fix
                  app/Jobs/StatusPipeline/StatusRemoteUpdatePipeline.php on lines 49..62

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 90.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  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
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language