pixelfed/pixelfed

View on GitHub

Showing 1,326 of 1,561 total issues

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

    public function mediaUpdate(Request $request, $id)
    {
        abort_if(! $request->user() || ! $request->user()->token(), 403);
        abort_unless($request->user()->tokenCan('write'), 403);

Severity: Minor
Found in app/Http/Controllers/Api/ApiV1Controller.php - About 1 hr to fix

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

        public function getUserCollections(Request $request, int $id)
        {
            $user = $request->user();
            $pid = $user ? $user->profile_id : null;
            $follows = false;
    Severity: Minor
    Found in app/Http/Controllers/CollectionController.php - About 1 hr to fix

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

          public function searchAPI(Request $request)
          {
              $this->validate($request, [
                  'q' => 'required|string|min:3|max:120',
                  'src' => 'required|string|in:metro',
      Severity: Minor
      Found in app/Http/Controllers/SearchController.php - About 1 hr to fix

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

            public function content()
            {
                $report = $this->report;
                $object_type = last(explode("\\", $this->report->object_type));
                $reporter = AccountService::get($report->profile_id, true);
        Severity: Minor
        Found in app/Mail/AdminNewReport.php - About 1 hr to fix

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

              public function handle()
              {
                  $this->info('       ____  _           ______         __  ');
                  $this->info('      / __ \(_)  _____  / / __/__  ____/ /  ');
                  $this->info('     / /_/ / / |/_/ _ \/ / /_/ _ \/ __  /   ');
          Severity: Minor
          Found in app/Console/Commands/AdminInviteCommand.php - About 1 hr to fix

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

                public function handle()
                {
                    $id = $this->argument('id');
                    $force = $this->option('force');
            
            
            Severity: Minor
            Found in app/Console/Commands/UserDelete.php - About 1 hr to fix

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

                  public function handleAcceptActivity()
                  {
                      $actor = $this->payload['object']['actor'];
                      $obj = $this->payload['object']['object'];
                      $type = $this->payload['object']['type'];
              Severity: Minor
              Found in app/Util/ActivityPub/Inbox.php - About 1 hr to fix

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

                    public function handle()
                    {
                        $like = $this->like;
                
                        $status = $this->like->status;
                Severity: Minor
                Found in app/Jobs/LikePipeline/LikePipeline.php - About 1 hr to fix

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

                      public function handle()
                      {
                          $follower = $this->follower;
                          $actor = $follower->actor;
                          $target = $follower->target;
                  Severity: Minor
                  Found in app/Jobs/FollowPipeline/FollowPipeline.php - About 1 hr to fix

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

                        public static function normalizeAudience($data, $localOnly = true)
                        {
                            if (! isset($data['to'])) {
                                return;
                            }
                    Severity: Minor
                    Found in app/Util/ActivityPub/Helpers.php - About 1 hr to fix

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

                          public static function getMastodonClient($domain)
                          {
                              if(RemoteAuthInstance::whereDomain($domain)->exists()) {
                                  return RemoteAuthInstance::whereDomain($domain)->first();
                              }
                      Severity: Minor
                      Found in app/Services/Account/RemoteAuthService.php - About 1 hr to fix

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

                            public function searchTag(Request $request)
                            {
                                abort_if(! $request->user(), 403);
                        
                                $this->validate($request, [
                        Severity: Minor
                        Found in app/Http/Controllers/ComposeController.php - About 1 hr to fix

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

                              public function updateAppeal(Request $request, $id)
                              {
                                  $this->validate($request, [
                                      'action' => 'required|in:dismiss,approve',
                                  ]);
                          Severity: Minor
                          Found in app/Http/Controllers/Admin/AdminReportController.php - About 1 hr to fix

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

                                public function discoverAccountsPopular(Request $request)
                                {
                                    abort_if(! $request->user(), 403);
                            
                                    $pid = $request->user()->profile_id;
                            Severity: Minor
                            Found in app/Http/Controllers/DiscoverController.php - About 1 hr to fix

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

                                  public function store(Request $request)
                                  {
                                      $this->validate($request, [
                                          'item' => 'required|integer|min:1',
                                      ]);
                              Severity: Minor
                              Found in app/Http/Controllers/BookmarkController.php - About 1 hr to fix

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

                                    public function inAppRegistrationConfirm(Request $request)
                                    {
                                        abort_if($request->user(), 404);
                                        abort_unless((bool) config_cache('pixelfed.open_registration'), 404);
                                        abort_unless((bool) config_cache('pixelfed.allow_app_registration'), 404);
                                Severity: Minor
                                Found in app/Http/Controllers/Api/ApiV1Dot1Controller.php - About 1 hr to fix

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

                                      public function conciergeStore(Request $request)
                                      {
                                          abort_if($request->user(), 404);
                                          $rules = [
                                              'sid' => 'required_if:action,email|integer|min:1|max:20000000',
                                  Severity: Minor
                                  Found in app/Http/Controllers/CuratedRegisterController.php - About 1 hr to fix

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

                                        protected function mediaSettings()
                                        {
                                            $this->line('');
                                            $this->info('Media Settings:');
                                            $optimize_media = $this->choice('Optimize media uploads? Requires jpegoptim and other dependencies!', ['false', 'true'], 1);
                                    Severity: Minor
                                    Found in app/Console/Commands/Installer.php - About 1 hr to fix

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

                                          protected function installerSteps()
                                          {
                                              $this->envCheck();
                                              $this->envCreate();
                                              $this->installType();
                                      Severity: Minor
                                      Found in app/Console/Commands/Installer.php - About 1 hr to fix

                                        Method handle has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function handle(): void
                                            {
                                                $sid = $this->sid;
                                                $status = StatusService::get($sid, false);
                                        
                                        
                                        Severity: Minor
                                        Found in app/Jobs/HomeFeedPipeline/FeedInsertPipeline.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language