visavi/rotor

View on GitHub

Showing 286 of 512 total issues

Method create has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function create(Request $request, Validator $validator)
    {
        if (! is_writable(resource_path('views/' . $this->path))) {
            abort(200, __('admin.files.directory_not_writable', ['dir' => $this->path]));
        }
Severity: Minor
Found in app/Http/Controllers/Admin/FileController.php - About 1 hr to fix

    Method recovery has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function recovery(Request $request, Validator $validator)
        {
            if (getUser()) {
                setFlash('danger', __('main.already_authorized'));
    
    
    Severity: Minor
    Found in app/Http/Controllers/MailController.php - About 1 hr to fix

      Method index has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function index(Request $request, Validator $validator)
          {
              $login = $request->input('user');
      
              if ($request->isMethod('post')) {
      Severity: Minor
      Found in app/Http/Controllers/IgnoreController.php - About 1 hr to fix

        Method editComment has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function editComment(int $id, int $cid, Request $request, Validator $validator)
            {
                $page = int($request->input('page', 1));
        
                /** @var News $news */
        Severity: Minor
        Found in app/Http/Controllers/NewsController.php - About 1 hr to fix

          Method change has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function change(Request $request, Validator $validator)
              {
                  $user = User::query()->where('login', $request->input('user'))->with('lastBan')->first();
          
                  if (! $user) {
          Severity: Minor
          Found in app/Http/Controllers/Admin/BanController.php - About 1 hr to fix

            Method perform has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function perform(Request $request, Validator $validator): Response
                {
                    if (! $request->ajax()) {
                        return redirect('/');
                    }
            Severity: Minor
            Found in app/Http/Controllers/Forum/BookmarkController.php - About 1 hr to fix

              Method file has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function file(?UploadedFile $input, array $rules, $label, bool $required = true): Validator
                  {
                      if (! $required && blank($input)) {
                          return $this;
                      }
              Severity: Minor
              Found in app/Classes/Validator.php - About 1 hr to fix

                Method user has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function user(Request $request): Response
                    {
                        /** @var User $user */
                        $user = $request->attributes->get('user');
                
                
                Severity: Minor
                Found in app/Http/Controllers/ApiController.php - About 1 hr to fix

                  Method topics has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function topics(int $id): Response
                      {
                          /** @var Topic $topic */
                          $topic = Topic::query()->find($id);
                  
                  
                  Severity: Minor
                  Found in app/Http/Controllers/ApiController.php - About 1 hr to fix

                    Method send has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function send(Request $request, Validator $validator): RedirectResponse
                        {
                            $money = int($request->input('money'));
                            $msg = $request->input('msg');
                    
                    
                    Severity: Minor
                    Found in app/Http/Controllers/TransferController.php - About 1 hr to fix

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

                          public function index(Request $request, Validator $validator)
                          {
                              $login = $request->input('user');
                      
                              if ($request->isMethod('post')) {
                      Severity: Minor
                      Found in app/Http/Controllers/ContactController.php - About 1 hr to fix

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

                            public function index(Request $request, Validator $validator)
                            {
                                if ($request->isMethod('post')) {
                                    $page = int($request->input('page', 1));
                                    $choice = intar($request->input('choice'));
                        Severity: Minor
                        Found in app/Http/Controllers/Admin/ReglistController.php - About 1 hr to fix

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

                              public function index(
                                  Request $request,
                                  Validator $validator,
                                  ImageManager $imageManager,
                              ) {
                          Severity: Minor
                          Found in app/Http/Controllers/User/PictureController.php - About 1 hr to fix

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

                                public function send(Request $request, Validator $validator, Flood $flood): RedirectResponse
                                {
                                    $login = $request->input('user');
                                    $msg = $request->input('msg');
                            
                            
                            Severity: Minor
                            Found in app/Http/Controllers/MessageController.php - About 1 hr to fix

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

                                  public function edit(int $id, Request $request, Validator $validator)
                                  {
                                      if (! isAdmin(User::BOSS)) {
                                          abort(403, __('errors.forbidden'));
                                      }
                              Severity: Minor
                              Found in app/Http/Controllers/Admin/BoardController.php - About 1 hr to fix

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

                                    public function index(Request $request)
                                    {
                                        if ($request->isMethod('post')) {
                                            $client = new Client(['timeout' => 30.0]);
                                
                                
                                Severity: Minor
                                Found in app/Http/Controllers/SocialController.php - About 1 hr to fix

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

                                      public function create(Request $request, Validator $validator, Flood $flood)
                                      {
                                          if (! $user = getUser()) {
                                              abort(403, __('main.not_authorized'));
                                          }
                                  Severity: Minor
                                  Found in app/Http/Controllers/OfferController.php - About 1 hr to fix

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

                                    function resizeProcess(?string $path, array $params = []): array
                                    {
                                        if (empty($params['alt'])) {
                                            $params['alt'] = basename($path);
                                        }
                                    Severity: Minor
                                    Found in app/helpers.php - About 1 hr to fix

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

                                          public function editPassword(Request $request, Validator $validator): RedirectResponse
                                          {
                                              if (! $user = getUser()) {
                                                  abort(403, __('main.not_authorized'));
                                              }
                                      Severity: Minor
                                      Found in app/Http/Controllers/User/UserController.php - About 1 hr to fix

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

                                            public function setting(Request $request, Validator $validator)
                                            {
                                                if (! $user = getUser()) {
                                                    abort(403, __('main.not_authorized'));
                                                }
                                        Severity: Minor
                                        Found in app/Http/Controllers/User/UserController.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language