DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function getCoursesForStudent has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
Open

    public function getCoursesForStudent(TblDivision $tblDivision, TblPerson $tblPerson)
    {

        $advancedCourses = array();
        $basicCourses = array();
Severity: Minor
Found in Application/Education/Certificate/Prepare/Service.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

Function formGenerate has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
Open

    private function formGenerate(TblYear $tblYear = null)
    {

        $certificateTypeList = array();
        $tblCertificateTypeAll = Generator::useService()->getCertificateTypeAll();
Severity: Minor
Found in Application/Education/Certificate/Generate/Frontend.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

Function countDivisionSubjectForSubjectTeacherByDivision has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
Open

    public
    function countDivisionSubjectForSubjectTeacherByDivision(
        TblDivision $tblDivision
    ) {

Severity: Minor
Found in Application/Education/Lesson/Division/Service.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

Function setConfig has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
Open

    public function setConfig($Name, ReaderInterface $Config = null)
    {

        if (null === self::$Connection
            && null !== $Config
Severity: Minor
Found in System/Cache/Handler/MemcachedHandler.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 Service.php has 454 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace SPHERE\Application\Billing\Bookkeeping\Basket;

use SPHERE\Application\Billing\Accounting\Creditor\Creditor;
Severity: Minor
Found in Application/Billing/Bookkeeping/Basket/Service.php - About 6 hrs to fix

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

        public static function getContent()
        {
            $sliceList = array();
    
            $sliceList[] = (new Slice())

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

          public static function getContent()
          {
      
              $sliceList = array();
      
      
      Severity: Major
      Found in Application/Api/Document/Standard/Repository/KamenzReport/E01.php - About 6 hrs to fix

        Method frontendExtendedClassList has 172 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function frontendExtendedClassList($DivisionId = null)
            {
        
                $Stage = new Stage('Auswertung', 'erweiterte Klassenlisten');
                if (null !== $DivisionId) {
        Severity: Major
        Found in Application/Reporting/Standard/Person/Frontend.php - About 6 hrs to fix

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

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

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

                public static function getContent()
                {
                    $sliceList = array();
            
                    $sliceList[] = (new Slice())
            Severity: Major
            Found in Application/Api/Document/Standard/Repository/KamenzReportGym/F01.php - About 6 hrs to fix

              Method frontendSelectDivision has 171 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function frontendSelectDivision($GenerateCertificateId = null, $Data = null)
                  {
              
                      $Stage = new Stage('Zeugnis generieren', 'Klassen zuordnen');
                      $Stage->addButton(new Standard('Zurück', '/Education/Certificate/Generate', new ChevronLeft()));
              Severity: Major
              Found in Application/Education/Certificate/Generate/Frontend.php - About 6 hrs to fix

                Service has 49 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class Service extends ServiceScoreRule
                {
                
                    /**
                     * @param bool $doSimulation
                Severity: Minor
                Found in Application/Education/Graduation/Gradebook/Service.php - About 6 hrs to fix

                  Method getProfileStandard has 170 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getProfileStandard($personId, $TextSize = '14px', $IsGradeUnderlined = false)
                      {
                  
                          $tblPerson = Person::useService()->getPersonById($personId);
                  
                  
                  Severity: Major
                  Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 6 hrs to fix

                    File ModTable.js has 449 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    (function($)
                    {
                        'use strict';
                        /**
                         * @param options
                    Severity: Minor
                    Found in Common/Script/ModTable.js - About 6 hrs to fix

                      Method frontendSetupFilter has 169 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function frontendSetupFilter($DynamicFilter = 0, $DynamicFilterMask = null, $FilterFieldName = null)
                          {
                      
                              $Stage = new Stage('Flexible Auswertung', 'Filter definieren');
                              $Stage->setMessage('');
                      Severity: Major
                      Found in Application/Reporting/Dynamic/Frontend.php - About 6 hrs to fix

                        Method frontendScoreDivision has 169 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function frontendScoreDivision(
                                $Id = null,
                                $YearId = null,
                                $Data = null
                            ) {
                        Severity: Major
                        Found in Application/Education/Graduation/Gradebook/ScoreRule/Frontend.php - About 6 hrs to fix

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

                              public function createClassList($tblDivisionList)
                              {
                          
                                  $tblPersonList = false;
                                  $tblYear = false;
                          Severity: Minor
                          Found in Application/Reporting/Custom/Muldental/Person/Service.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

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

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

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

                              public function loadSimilarPersonContent($Person)
                              {
                                  if ((!isset($Person['FirstName']) || empty($Person['FirstName']))
                                      || (!isset($Person['LastName']) || empty($Person['LastName']))
                                  ) {
                          Severity: Minor
                          Found in Application/People/Person/Frontend/FrontendBasic.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

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

                              public function getMissingSubjectsWithScoreType()
                              {
                          
                                  $list = array();
                                  if (($tblYearList = Term::useService()->getYearByNow())) {
                          Severity: Minor
                          Found in Application/Education/Graduation/Gradebook/ScoreRule/Service.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

                          Severity
                          Category
                          Status
                          Source
                          Language