ehosp/eHOSP-Services-CE

View on GitHub

Showing 37 of 149 total issues

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

    public function run()
    {
        $postDataType = DataType::where('slug', 'posts')->firstOrFail();
        $pageDataType = DataType::where('slug', 'pages')->firstOrFail();
        $userDataType = DataType::where('slug', 'users')->firstOrFail();
Severity: Major
Found in src/database/seeds/DataRowsTableSeeder.php - About 4 days to fix

    File DataRowsTableSeeder.php has 880 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    use Illuminate\Database\Seeder;
    use TCG\Voyager\Models\DataRow;
    use TCG\Voyager\Models\DataType;
    Severity: Major
    Found in src/database/seeds/DataRowsTableSeeder.php - About 2 days to fix

      Function run has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
      Open

          public function run()
          {
              $postDataType = DataType::where('slug', 'posts')->firstOrFail();
              $pageDataType = DataType::where('slug', 'pages')->firstOrFail();
              $userDataType = DataType::where('slug', 'users')->firstOrFail();
      Severity: Minor
      Found in src/database/seeds/DataRowsTableSeeder.php - About 1 day 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 run has 196 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function run()
          {
              if (file_exists(base_path('routes/web.php'))) {
                  require base_path('routes/web.php');
      
      
      Severity: Major
      Found in src/database/seeds/MenuItemsTableSeeder.php - About 7 hrs to fix

        File nxt-ui.js has 472 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*******************************************************************************
        * Main Functions
        *
        *******************************************************************************/
        
        
        Severity: Minor
        Found in src/resources/assets/js/lib/nxt-ui.js - About 7 hrs to fix

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

          @extends('layouts.app')
          
          @section('content')
          <div class="container">
              <div class="row">
          Severity: Minor
          Found in src/resources/views/auth/register.blade.php - About 5 hrs to fix

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

            <?php
            
            return [
                'date' => [
                    'last_week' => 'Letzte Woche',
            Severity: Minor
            Found in src/resources/lang/de/voyager.php - About 5 hrs to fix

              File voyager.php has 385 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              return [
                  'date' => [
                      'last_week' => 'Last Week',
              Severity: Minor
              Found in src/resources/lang/en/voyager.php - About 5 hrs to fix

                File voyager.php has 385 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                
                return [
                    'date' => [
                        'last_week' => 'Ultima Settimana',
                Severity: Minor
                Found in src/resources/lang/it/voyager.php - About 5 hrs to fix

                  File voyager.php has 384 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  
                  return [
                      'date' => [
                          'last_week' => 'La semana pasada',
                  Severity: Minor
                  Found in src/resources/lang/es/voyager.php - About 5 hrs to fix

                    File voyager.php has 382 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    
                    return [
                        'date' => [
                            'last_week' => 'La semaine dernière',
                    Severity: Minor
                    Found in src/resources/lang/fr/voyager.php - About 5 hrs to fix

                      File voyager.php has 372 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      
                      return [
                          'date' => [
                              'last_week' => '上周',
                      Severity: Minor
                      Found in src/resources/lang/zh_CN/voyager.php - About 4 hrs to fix

                        File voyager.php has 371 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        
                        return [
                            'date' => [
                                'last_week' => 'Geçen Hafta',
                        Severity: Minor
                        Found in src/resources/lang/tr/voyager.php - About 4 hrs to fix

                          File voyager.php has 370 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          
                          return [
                              'date' => [
                                  'last_week' => 'На прошлой неделе',
                          Severity: Minor
                          Found in src/resources/lang/ru/voyager.php - About 4 hrs to fix

                            File voyager.php has 359 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            <?php
                            
                            return [
                                'date' => [
                                    'last_week' => 'Semana Passada',
                            Severity: Minor
                            Found in src/resources/lang/pt/voyager.php - About 4 hrs to fix

                              File voyager.php has 359 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              <?php
                              
                              return [
                                  'date' => [
                                      'last_week' => 'الأسبوع الماضي',
                              Severity: Minor
                              Found in src/resources/lang/ar/voyager.php - About 4 hrs to fix

                                File voyager.php has 358 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                <?php
                                
                                return [
                                    'date' => [
                                        'last_week' => 'Semana Passada',
                                Severity: Minor
                                Found in src/resources/lang/pt_br/voyager.php - About 4 hrs to fix

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

                                      public function run()
                                      {
                                          $setting = $this->findSetting('site.title');
                                          if (!$setting->exists) {
                                              $setting->fill([
                                  Severity: Major
                                  Found in src/database/seeds/SettingsTableSeeder.php - About 4 hrs to fix

                                    Function run has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public function run()
                                        {
                                            if (file_exists(base_path('routes/web.php'))) {
                                                require base_path('routes/web.php');
                                    
                                    
                                    Severity: Minor
                                    Found in src/database/seeds/MenuItemsTableSeeder.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 run has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function run()
                                        {
                                            $dataType = $this->dataType('slug', 'posts');
                                            if (!$dataType->exists) {
                                                $dataType->fill([
                                    Severity: Major
                                    Found in src/database/seeds/DataTypesTableSeeder.php - About 3 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language