pixelfed/pixelfed

View on GitHub
app/Http/Controllers/Admin/AdminInstanceController.php

Summary

Maintainability
B
6 hrs
Test Coverage

Method getInstancesApi has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getInstancesApi(Request $request)
    {
        $this->validate($request, [
            'filter' => [
                'nullable',
Severity: Major
Found in app/Http/Controllers/Admin/AdminInstanceController.php - About 2 hrs to fix

    File AdminInstanceController.php has 259 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace App\Http\Controllers\Admin;
    
    use DB, Cache;
    Severity: Minor
    Found in app/Http/Controllers/Admin/AdminInstanceController.php - About 2 hrs to fix

      Method instanceEdit has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Method importBackup has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function importBackup(Request $request)
            {
                $this->validate($request, [
                    'banned' => 'sometimes|array',
                    'auto_cw' => 'sometimes|array',
        Severity: Minor
        Found in app/Http/Controllers/Admin/AdminInstanceController.php - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status