DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function Client has a Cognitive Complexity of 91 (exceeds 5 allowed). Consider refactoring.
Open

var Client = (function ()
{
    'use strict';
    var useDelay = 30;
    var useConfig = {};
Severity: Minor
Found in Common/Script/Loader.js - 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

Function frontendPrintCertificate has a Cognitive Complexity of 91 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendPrintCertificate()
    {

        $Stage = new Stage('Zeugnis', 'Übersicht (nicht gedruckte Zeugnisse)');
        $Stage->addButton(new Standard('Historie Personen', '/Education/Certificate/PrintCertificate/History', null, array(),
Severity: Minor
Found in Application/Education/Certificate/PrintCertificate/Frontend.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 buildContentPage has 364 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function buildContentPage(
        $personId,
        $isSample,
        $title = 'Halbjahresinformation der Schule (Primarstufe)',
        $term,

    File Lectureship.php has 771 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace SPHERE\Application\Transfer\Indiware\Import;
    
    use SPHERE\Application\Document\Storage\FilePointer;
    Severity: Major
    Found in Application/Transfer/Indiware/Import/Lectureship.php - About 1 day to fix

      Method getContent has 362 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function getContent()
          {
              $sliceList = array();
      
              $left = '50%';
      Severity: Major
      Found in Application/Api/Document/Standard/Repository/KamenzReportGS/E01.php - About 1 day to fix

        Method buildPages has 361 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function buildPages(TblPerson $tblPerson = null)
            {
        
                $personId = $tblPerson ? $tblPerson->getId() : 0;
        
        

          Method buildPages has 360 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function buildPages(TblPerson $tblPerson = null)
              {
          
                  $personId = $tblPerson ? $tblPerson->getId() : 0;
          
          

            Method frontendDashboard has 360 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function frontendDashboard()
                {
            
                    $Stage = new Stage('Schulsoftware','Roadmap');
            
            
            Severity: Major
            Found in Application/Platform/Roadmap/Roadmap.php - About 1 day to fix

              Method firstPage has 358 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function firstPage($personId)
                  {
                      $marginTop = '10px';
              
                      $Page = (new Page())

                Function doFragmentDiff has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring.
                Open

                    private static function doFragmentDiff($from_text, $to_text, $delimiters)
                    {
                
                        // Empty delimiter means character-level diffing.
                        // In such case, use code path optimized for character-level
                Severity: Minor
                Found in Application/Platform/System/Protocol/Difference/finediff.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 getContent has 354 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function getContent()
                    {
                        $sliceList = array();
                        $left = '50%';
                        $width = '5%';
                Severity: Major
                Found in Application/Api/Document/Standard/Repository/KamenzReportGS/E03.php - About 1 day to fix

                  Method createKindergartenFromFile has 354 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function createKindergartenFromFile(
                          IFormInterface $Form = null,
                          UploadedFile $File = null
                      ) {
                  
                  
                  Severity: Major
                  Found in Application/Transfer/Import/Seelitz/Service.php - About 1 day to fix

                    Function frontendLayoutPersonNew has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function frontendLayoutPersonNew(TblPerson $tblPerson)
                        {
                    
                            $phoneList = array();
                            $phoneEmergencyList = array();
                    Severity: Minor
                    Found in Application/Contact/Phone/Frontend.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

                    File PasswordChange.php has 752 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    namespace SPHERE\Application\Api\Document\Standard\Repository\PasswordChange;
                    
                    use SPHERE\Application\Api\Document\AbstractDocument;
                    use SPHERE\Application\Contact\Address\Address;

                      Method frontendSerialLetterExport has 350 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function frontendSerialLetterExport(
                              $Id = null,
                              $Control = false
                          ) {
                              $Stage = new Stage('Adresslisten für Serienbriefe', 'Person mit Adressen herunterladen');
                      Severity: Major
                      Found in Application/Reporting/SerialLetter/Frontend.php - About 1 day to fix

                        Function createTeachersFromFile has a Cognitive Complexity of 87 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function createTeachersFromFile(
                                IFormInterface $Form = null,
                                UploadedFile $File = null
                            ) {
                        
                        
                        Severity: Minor
                        Found in Application/Transfer/Import/FuxMedia/Service.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

                        Function getTeacherWelcome has a Cognitive Complexity of 87 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function getTeacherWelcome(TblPerson $tblPerson)
                            {
                        
                                $appointedDateTaskList = array();
                                $behaviorTask = array();
                        Severity: Minor
                        Found in Application/Education/Graduation/Evaluation/Service.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 frontendSelectPrepare has 344 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function frontendSelectPrepare($IsAllYears = false, $YearId = null)
                            {
                        
                                $Stage = new Stage('Zeugnisse freigeben', 'Übersicht');
                        
                        
                        Severity: Major
                        Found in Application/Education/Certificate/Approve/Frontend.php - About 1 day to fix

                          Function frontendSerialLetterEdit has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function frontendSerialLetterEdit(
                                  $Id = null,
                                  $Control = false,
                                  $SerialLetter = null,
                                  $TabActive = null,
                          Severity: Minor
                          Found in Application/Reporting/SerialLetter/Frontend.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

                          Function createCompaniesFromFile has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function createCompaniesFromFile(IFormInterface $Form = null, UploadedFile $File = null)
                              {
                          
                                  /**
                                   * Skip to Frontend
                          Severity: Minor
                          Found in Application/Transfer/Import/Braeunsdorf/Service.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

                          Severity
                          Category
                          Status
                          Source
                          Language