ehosp/eHOSP-Services-CE

View on GitHub

Showing 37 of 149 total issues

Function nxt_motor has 70 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function nxt_motor() {
    motorHTML = `
    <div id="left">
        <div id="port">
            <h3>Port</h3>
Severity: Major
Found in src/resources/assets/js/lib/nxt-ui.js - About 2 hrs to fix

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

        public function run()
        {
            $post = $this->findPost('lorem-ipsum-post');
            if (!$post->exists) {
                $post->fill([
    Severity: Major
    Found in src/database/seeds/PostsTableSeeder.php - About 2 hrs to fix

      Method dataTypesTranslations has 52 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function dataTypesTranslations()
          {
              // Adding translations for 'display_name_singular'
              //
              $_fld = 'display_name_singular';
      Severity: Major
      Found in src/database/seeds/TranslationsTableSeeder.php - About 2 hrs to fix

        File CountryToLang.php has 253 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        /*
        |--------------------------------------------------------------------------
        | Country Code to Language Code
        Severity: Minor
        Found in src/global/data/CountryToLang.php - About 2 hrs to fix

          File CountryToCode.php has 252 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          /*
          |--------------------------------------------------------------------------
          | Country Name to Country Code
          Severity: Minor
          Found in src/global/data/CountryToCode.php - About 2 hrs to fix

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

                public function handle()
                {
                    $originalTile = $this->ask('Please give a title to the post:');
                    $author = $this->ask('Please specify the author:');
                    $image = $image_alt = "";
            Severity: Minor
            Found in src/app/Console/Commands/NewBlogPost.php - About 2 hrs to fix

              Function fileUpload has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              function fileUpload() {
                  var x = document.getElementById("myFile");
                  var txt = "";
                  if ('files' in x) {
                      if (x.files.length == 0) {
              Severity: Minor
              Found in src/resources/assets/js/lib/nxt-ui.js - About 1 hr 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

              Function nxt_sound has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function nxt_sound() {
                  soundHTML = `
                  <div id="left">
                      <div id="action">
                          <h3>Action</h3>
              Severity: Minor
              Found in src/resources/assets/js/lib/nxt-ui.js - About 1 hr to fix

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

                    private function menusTranslations()
                    {
                        $_tpl = ['menu_items', 'title'];
                        $_item = $this->findMenuItem('Dashboard');
                        if ($_item->exists) {
                Severity: Minor
                Found in src/database/seeds/TranslationsTableSeeder.php - About 1 hr to fix

                  Function dataTypesTranslations has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private function dataTypesTranslations()
                      {
                          // Adding translations for 'display_name_singular'
                          //
                          $_fld = 'display_name_singular';
                  Severity: Minor
                  Found in src/database/seeds/TranslationsTableSeeder.php - About 1 hr 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

                  Function menusTranslations has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private function menusTranslations()
                      {
                          $_tpl = ['menu_items', 'title'];
                          $_item = $this->findMenuItem('Dashboard');
                          if ($_item->exists) {
                  Severity: Minor
                  Found in src/database/seeds/TranslationsTableSeeder.php - About 1 hr 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

                  Function __modal__ has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function __modal__(header, htmlBody) {
                      var html = `
                          <div class="modal-content">
                          <div class="modal-header">
                              <span class="close">Χ</span>
                  Severity: Minor
                  Found in src/resources/assets/js/lib/nxt-ui.js - About 1 hr to fix

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

                        public function up()
                        {
                            // Create table for storing roles
                            Schema::create('data_types', function (Blueprint $table) {
                                $table->increments('id');

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

                          public function run()
                          {
                              $setting = $this->findSetting('site.title');
                              if (!$setting->exists) {
                                  $setting->fill([
                      Severity: Minor
                      Found in src/database/seeds/SettingsTableSeeder.php - About 1 hr 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

                      Function Content has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function Content(path) {
                          if (path === "") {
                              return;
                          } else {
                              if (window.XMLHttpRequest) {
                      Severity: Minor
                      Found in src/resources/assets/js/lib/patient-med-profile.js - About 55 mins 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

                      Function handle has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function handle()
                          {
                              $indexJsonFile = file_get_contents(resource_path('views/blog/index.json'));
                              $indexDecode = json_decode($indexJsonFile, true);
                      
                      
                      Severity: Minor
                      Found in src/app/Console/Commands/PublishBlogPosts.php - About 35 mins 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

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

                          public function run()
                          {
                              $dataType = $this->dataType('slug', 'posts');
                              if (!$dataType->exists) {
                                  $dataType->fill([
                      Severity: Minor
                      Found in src/database/seeds/DataTypesTableSeeder.php - About 25 mins 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

                      Severity
                      Category
                      Status
                      Source
                      Language