pixelfed/pixelfed

View on GitHub

Showing 1,326 of 1,561 total issues

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

    public function handle()
    {
        $profile = $this->profile;

        $client = new Client([
Severity: Minor
Found in app/Jobs/DeletePipeline/FanoutDeletePipeline.php - About 1 hr to fix

    Method publishStoryPoll has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function publishStoryPoll(Request $request)
        {
            abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404);
    
            $this->validate($request, [
    Severity: Minor
    Found in app/Http/Controllers/StoryComposeController.php - About 1 hr to fix

      Method accountUnfollowById has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function accountUnfollowById(Request $request, $id)
          {
              abort_if(! $request->user() || ! $request->user()->token(), 403);
              abort_unless($request->user()->tokenCan('follow'), 403);
      
      
      Severity: Minor
      Found in app/Http/Controllers/Api/ApiV1Controller.php - About 1 hr to fix

        Function stringEncode has 46 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function stringEncode (string) {
            var pos = 0
            var len = string.length
            var Arr = global.Uint8Array || Array // Use byte array when possible
        
        
        Severity: Minor
        Found in resources/assets/js/polyfill.js - About 1 hr to fix

          Method blindKeyRotation has 46 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function blindKeyRotation($headers, $profile, $payload)
              {
                  $signature = is_array($headers['signature']) ? $headers['signature'][0] : $headers['signature'];
                  $date = is_array($headers['date']) ? $headers['date'][0] : $headers['date'];
                  if(!$signature) {
          Severity: Minor
          Found in app/Jobs/InboxPipeline/InboxValidator.php - About 1 hr to fix

            Method remoteAnnounceDeliver has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function remoteAnnounceDeliver()
                {
                    if (config('app.env') !== 'production' || (bool) config_cache('federation.activitypub.enabled') == false) {
                        return true;
                    }
            Severity: Minor
            Found in app/Jobs/SharePipeline/SharePipeline.php - About 1 hr to fix

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

                  public function handle()
                  {
                      $story = $this->story;
                      $profile = $story->profile;
              
              
              Severity: Minor
              Found in app/Jobs/StoryPipeline/StoryFanout.php - About 1 hr to fix

                Method blindKeyRotation has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    protected function blindKeyRotation($headers, $payload)
                    {
                        $signature = is_array($headers['signature']) ? $headers['signature'][0] : $headers['signature'];
                        $date = is_array($headers['date']) ? $headers['date'][0] : $headers['date'];
                        if(!$signature) {
                Severity: Minor
                Found in app/Jobs/InboxPipeline/InboxWorker.php - About 1 hr to fix

                  Method blindKeyRotation has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      protected function blindKeyRotation($headers, $payload)
                      {
                          $signature = is_array($headers['signature']) ? $headers['signature'][0] : $headers['signature'];
                          $date = is_array($headers['date']) ? $headers['date'][0] : $headers['date'];
                          if(!$signature) {
                  Severity: Minor
                  Found in app/Jobs/InboxPipeline/DeleteWorker.php - About 1 hr to fix

                    Method directoryHandleServerSubmission has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function directoryHandleServerSubmission(Request $request)
                        {
                            $reqs = [];
                            $reqs['feature_config'] = [
                                'open_registration' => (bool) config_cache('pixelfed.open_registration'),
                    Severity: Minor
                    Found in app/Http/Controllers/Admin/AdminDirectoryController.php - About 1 hr to fix

                      Method show has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function show(Request $request, $username, $id)
                          {
                              // redirect authed users to Metro 2.0
                              if ($request->user()) {
                                  // unless they force static view
                      Severity: Minor
                      Found in app/Http/Controllers/StatusController.php - About 1 hr to fix

                        Method trendingApi has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function trendingApi(Request $request)
                            {
                                abort_if(config('instance.discover.public') == false && ! $request->user(), 403);
                        
                                $this->validate($request, [
                        Severity: Minor
                        Found in app/Http/Controllers/DiscoverController.php - About 1 hr to fix

                          Method store has 46 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/LikeController.php - About 1 hr to fix

                            Method statusComments has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function statusComments(Request $request, $username, int $postId)
                                {
                                    $this->validate($request, [
                                        'min_id'    => 'nullable|integer|min:1',
                                        'max_id'    => 'nullable|integer|min:1|max:'.PHP_INT_MAX,
                            Severity: Minor
                            Found in app/Http/Controllers/PublicApiController.php - About 1 hr to fix

                              Method hugeMode has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  protected function hugeMode($minId, $limit, $log)
                                  {
                                      $cloudDisk = Storage::disk(config('filesystems.cloud'));
                                      $localDisk = Storage::disk('local');
                              
                              
                              Severity: Minor
                              Found in app/Console/Commands/MediaS3GarbageCollector.php - About 1 hr to fix

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

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

                                  Method updateMedia has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      protected function updateMedia($status, $activity)
                                      {
                                          if (! isset($activity['attachment'])) {
                                              return;
                                          }
                                  Severity: Minor
                                  Found in app/Jobs/StatusPipeline/StatusRemoteUpdatePipeline.php - About 1 hr to fix

                                    Method fanoutExpiry has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        protected function fanoutExpiry()
                                        {
                                            $story = $this->story;
                                            $profile = $story->profile;
                                    
                                    
                                    Severity: Minor
                                    Found in app/Jobs/StoryPipeline/StoryExpire.php - About 1 hr to fix

                                      Method run has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          protected function run($query)
                                          {
                                              $this->query = $query;
                                              $q = urldecode($query->input('q'));
                                      
                                      
                                      Severity: Minor
                                      Found in app/Services/SearchApiV2Service.php - About 1 hr to fix

                                        Method cleanup has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public static function cleanup($avatar, $confirm = false)
                                            {
                                                if(!$avatar || !$confirm) {
                                                    return;
                                                }
                                        Severity: Minor
                                        Found in app/Services/AvatarService.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language