DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

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

    public function updateLeaveContent(
        IFormInterface $Form = null,
        TblPerson $tblPerson,
        TblDivision $tblDivision,
        TblCertificate $tblCertificate,
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 frontendStudentList has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendStudentList()
    {

        $Stage = new Stage('SchülerListe');

Severity: Minor
Found in Application/Document/Custom/Radebeul/Radebeul.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 Client has 168 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var Client = (function ()
{
    'use strict';
    var useDelay = 30;
    var useConfig = {};
Severity: Major
Found in Common/Script/Loader.js - About 6 hrs to fix

    Method frontendPrepareShowSubjectGrades has 168 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function frontendPrepareShowSubjectGrades($PrepareId = null, $GroupId = null, $Route = null)
        {
    
            $Stage = new Stage('Zeugnisvorbereitung', 'Fachnoten-Übersicht');
    
    
    Severity: Major
    Found in Application/Education/Certificate/Prepare/Frontend.php - About 6 hrs to fix

      Method frontendDivision has 167 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function frontendDivision($GenerateCertificateId = null)
          {
      
              $Stage = new Stage('Zeugnis generieren', 'Klassenübersicht');
              $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

        ApiIndividual has 48 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class ApiIndividual extends IndividualReceiver implements IApiInterface, IModuleInterface
        {
        
            // Schränkt die Auswahl der Filterung auf "like" und "not like" ein
            private $reducedSelectBoxList = array(
        Severity: Minor
        Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 6 hrs to fix

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

          class Service extends AbstractService
          {
          
              /**
               * @param bool $doSimulation
          Severity: Minor
          Found in Application/Reporting/SerialLetter/Service.php - About 6 hrs to fix

            Support has 48 functions (exceeds 20 allowed). Consider refactoring.
            Open

            abstract class Support extends Integration
            {
            
                /**
                 * @param $Id
            Severity: Minor
            Found in Application/People/Meta/Student/Service/Service/Support.php - About 6 hrs to fix

              Consider simplifying this complex logical expression.
              Open

                      if ($unAssignedCount == 2 && $assignedCount == 0
                          && ($gender1 = $unAssigned[1]->getGenderName())
                          && ($gender2 = $unAssigned[2]->getGenderName())
                          && $gender1 != $gender2
                      ) {
              Severity: Critical
              Found in Application/People/Group/CustodySorter.php - About 6 hrs to fix

                Filter has 48 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class Filter extends Extension
                {
                
                    const DESCRIPTION_GROUP = 'Personengruppe';
                    const DESCRIPTION_GENDER = 'Personendaten: Geschlecht';
                Severity: Minor
                Found in Application/Education/Lesson/Division/Filter/Filter.php - About 6 hrs to fix

                  Method frontendHeadmasterGradeBook has 166 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function frontendHeadmasterGradeBook($IsAllYears = false, $YearId = null)
                      {
                  
                          $Stage = new Stage('Notenbuch', 'Auswahl');
                          $Stage->setMessage(
                  Severity: Major
                  Found in Application/Education/Graduation/Gradebook/Frontend.php - About 6 hrs to fix

                    File ApiUserAccount.php has 443 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    namespace SPHERE\Application\Api\Setting\UserAccount;
                    
                    use SPHERE\Application\Api\ApiTrait;
                    use SPHERE\Application\Api\Dispatcher;
                    Severity: Minor
                    Found in Application/Api/Setting/UserAccount/ApiUserAccount.php - About 6 hrs to fix

                      File Service.php has 442 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      namespace SPHERE\Application\People\Group;
                      
                      use SPHERE\Application\Education\Lesson\Division\Division;
                      use SPHERE\Application\Education\Lesson\Division\Service\Entity\TblDivision;
                      Severity: Minor
                      Found in Application/People/Group/Service.php - About 6 hrs to fix

                        Method getGroupList has 165 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getGroupList(){
                                return array(
                        //            'Änderung' => '',
                                    'Ehemalige' => 'zu bereinigen',
                                    'Ehemalige.Eltern' => 'zu bereinigen',
                        Severity: Major
                        Found in Application/Transfer/Import/Dresden/DresdenGroup.php - About 6 hrs to fix

                          Method setupDatabaseContent has 165 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function setupDatabaseContent()
                              {
                          
                                  $tblStudentAgreementCategory = $this->createStudentAgreementCategory(
                                      'Foto des Schülers',
                          Severity: Major
                          Found in Application/People/Meta/Student/Service/Data.php - About 6 hrs to fix

                            Method frontendPrintCertificate has 165 lines of code (exceeds 25 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: Major
                            Found in Application/Education/Certificate/PrintCertificate/Frontend.php - About 6 hrs to fix

                              Function getRelationshipList has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  private function getRelationshipList(TblPerson $tblPerson, $list, $isDeepSearch)
                                  {
                                      if (($tblRelationshipList = Relationship::useService()->getPersonRelationshipAllByPerson($tblPerson))) {
                                          foreach ($tblRelationshipList as $tblToPerson) {
                                              if (($tblType = $tblToPerson->getTblType())
                              Severity: Minor
                              Found in Application/Contact/Address/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 frontendContact has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function frontendContact($Id = null, $Person = null, $Group = null, $tblPerson = null, $tblType = null, $tblSalutation = null, $doCreate = false)
                                  {
                                      $Stage = new Stage('Institution', 'Ansprechpartner');
                                      $Stage->addButton(new Standard('Zurück', '/Corporation/Company', new ChevronLeft(), array(
                                          'Id' => $Id,
                              Severity: Minor
                              Found in Application/Corporation/Company/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 openOverViewModal has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public static function openOverViewModal($PersonId, $showPersonPanel = true)
                                  {
                              
                                      $tblPerson = Person::useService()->getPersonById($PersonId);
                                      if(!$tblPerson){
                              Severity: Minor
                              Found in Application/Api/People/Meta/Support/ApiSupportReadOnly.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 setCourses has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  private function setCourses(TblPerson $tblPerson = null)
                                  {
                              
                                      $advancedCourses = array();
                                      $basicCourses = array();

                              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