Showing 186 of 479 total issues

File IntelController.php has 511 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/*
 * This file is part of SeAT
 *
Severity: Major
Found in src/Http/Controllers/Character/IntelController.php - About 1 day to fix

    Function validate_menu has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
    Open

        public function validate_menu(string $package_name, array $menu_data)
        {
    
            if (! is_string($package_name))
                throw new PackageMenuBuilderException(
    Severity: Minor
    Found in src/Http/Composers/AbstractMenu.php - About 6 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    File view.blade.php has 439 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    @extends('web::layouts.grids.6-6')
    
    @section('title', trans('web::seat.settings'))
    @section('page_header', trans('web::seat.settings'))
    
    
    Severity: Minor
    Found in src/resources/views/configuration/settings/view.blade.php - About 6 hrs to fix

      File show.blade.php has 432 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      @extends('web::layouts.grids.12')
      
      @section('title', trans_choice('web::squads.squad', 0))
      @section('page_header', trans_choice('web::squads.squad', 1))
      @section('page_description', $squad->name)
      Severity: Minor
      Found in src/resources/views/squads/show.blade.php - About 6 hrs to fix

        File FastLookupController.php has 396 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        /*
         * This file is part of SeAT
         *
        Severity: Minor
        Found in src/Http/Controllers/Support/FastLookupController.php - About 5 hrs to fix

          Function update has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
          Open

              public function update(Request $request, Role $role)
              {
                  $request->validate([
                      'title' => 'string|required',
                      'description' => 'string|nullable',
          Severity: Minor
          Found in src/Http/Controllers/Configuration/AccessController.php - About 5 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          File view.blade.php has 343 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          @extends('web::layouts.grids.6-6')
          
          @section('title', trans('web::seat.user_profile'))
          @section('page_header', trans('web::seat.user_profile'))
          
          
          Severity: Minor
          Found in src/resources/views/profile/view.blade.php - About 4 hrs to fix

            Function draw has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
            Open

                public function draw(Model $row)
                {
                    if ($row->location_type == 'station')
                        return $row->station->name;
            
            
            Severity: Minor
            Found in src/Http/DataTables/Character/Intel/Assets/Columns/Station.php - About 3 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Method ajax has 83 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function ajax()
                {
                    return datatables()
                        ->eloquent($this->applyScopes($this->query()))
                        ->editColumn('action', function ($row) {
            Severity: Major
            Found in src/Http/DataTables/Common/Financial/AbstractContractDataTable.php - About 3 hrs to fix

              File summary.blade.php has 292 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              @extends('web::character.intel.layouts.view', ['sub_viewname' => 'summary', 'breadcrumb' => trans('web::seat.intel')])
              
              @section('page_header', trans_choice('web::seat.character', 1) . ' ' . trans('web::seat.intel'))
              
              @inject('request', 'Illuminate\Http\Request')
              Severity: Minor
              Found in src/resources/views/character/intel/summary.blade.php - About 3 hrs to fix

                File edit.blade.php has 291 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                @extends('web::layouts.grids.4-8')
                
                @section('title', trans('web::seat.edit_user'))
                @section('page_header', trans('web::seat.edit_user'))
                @section('page_description', $user->name)
                Severity: Minor
                Found in src/resources/views/configuration/users/edit.blade.php - About 3 hrs to fix

                  Method update has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function update(Request $request, Role $role)
                      {
                          $request->validate([
                              'title' => 'string|required',
                              'description' => 'string|nullable',
                  Severity: Major
                  Found in src/Http/Controllers/Configuration/AccessController.php - About 2 hrs to fix

                    Method ajax has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function ajax()
                        {
                            return datatables()
                                ->eloquent($this->applyScopes($this->query()))
                                ->editColumn('start_date', function ($row) {
                    Severity: Major
                    Found in src/Http/DataTables/Common/Industrial/AbstractIndustryDataTable.php - About 2 hrs to fix

                      Squad has 24 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class Squad extends Model
                      {
                          use Filterable;
                      
                          /**
                      Severity: Minor
                      Found in src/Models/Squads/Squad.php - About 2 hrs to fix

                        WebServiceProvider has 24 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class WebServiceProvider extends AbstractSeatPlugin
                        {
                            /**
                             * Bootstrap the application services.
                             *
                        Severity: Minor
                        Found in src/WebServiceProvider.php - About 2 hrs to fix

                          File WebServiceProvider.php has 277 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          
                          /*
                           * This file is part of SeAT
                           *
                          Severity: Minor
                          Found in src/WebServiceProvider.php - About 2 hrs to fix

                            Method ajax has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function ajax()
                                {
                                    return datatables()
                                        ->eloquent($this->applyScopes($this->query()))
                                        ->editColumn('action', function ($row) {
                            Severity: Major
                            Found in src/Http/DataTables/Common/Military/AbstractKillMailDataTable.php - About 2 hrs to fix

                              Method getEntities has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getEntities(Request $request)
                                  {
                              
                                      $this->validate($request, [
                                          'type' => 'in:characters,corporations,alliances',
                              Severity: Major
                              Found in src/Http/Controllers/Support/FastLookupController.php - About 2 hrs to fix

                                File sheet.blade.php has 261 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                @extends('web::character.layouts.view', ['viewname' => 'sheet', 'breadcrumb' => trans('web::seat.sheet')])
                                
                                @section('page_header', trans_choice('web::seat.character', 1) . ' ' . trans('web::seat.sheet'))
                                
                                @inject('request', 'Illuminate\Http\Request')
                                Severity: Minor
                                Found in src/resources/views/character/sheet.blade.php - About 2 hrs to fix

                                  Method ajax has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function ajax()
                                      {
                                          return datatables()
                                              ->eloquent($this->applyScopes($this->query()))
                                              ->editColumn('issued', function ($row) {
                                  Severity: Major
                                  Found in src/Http/DataTables/Common/Financial/AbstractMarketDataTable.php - About 2 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language