DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function createAddressPersonCompany has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
Open

    public function createAddressPersonCompany(TblSerialLetter $tblSerialLetter)
    {

        $tblSerialPersonList = SerialLetter::useService()->getSerialPersonBySerialLetter($tblSerialLetter);
        $tblType = Address::useService()->getTypeById(1);
Severity: Minor
Found in Application/Reporting/SerialLetter/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 updateScoreTypeDivisionSubject has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
Open

    public function updateScoreTypeDivisionSubject(
        IFormInterface $Stage = null,
        TblScoreType $tblScoreType,
        TblYear $tblYear = null,
        $Data = null
Severity: Minor
Found in Application/Education/Graduation/Gradebook/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

File E08.php has 559 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * Created by PhpStorm.
 * User: lehmann
 * Date: 23.06.2017
Severity: Major
Found in Application/Api/Document/Standard/Repository/KamenzReport/E08.php - About 1 day to fix

    Method frontendContact has 235 lines of code (exceeds 25 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: Major
    Found in Application/Corporation/Company/Frontend.php - About 1 day to fix

      Method getContent has 235 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/E16.php - About 1 day to fix

        Method getNavigation has 234 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getNavigation($ViewType = TblWorkSpace::VIEW_TYPE_ALL)
            {
        
                // remove every entry that is already chosen
                $WorkSpaceList = array();
        Severity: Major
        Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 1 day to fix

          Method frontendFillAccidentReport has 234 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function frontendFillAccidentReport($Id = null)
              {
          
                  $Stage = new Stage('Unfallanzeige', 'Erstellen');
                  $Stage->addButton(new Standard('Zurück', '/Document/Standard/AccidentReport', new ChevronLeft()));
          Severity: Major
          Found in Application/Document/Standard/AccidentReport/AccidentReport.php - About 1 day to fix

            Method createCompaniesFromFile has 233 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Method createClassList has 232 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function createClassList($tblDivisionList)
                  {
              
                      $tblPersonList = false;
                      $tblYear = false;
              Severity: Major
              Found in Application/Reporting/Custom/Muldental/Person/Service.php - About 1 day to fix

                Function updateScoreRuleDivisionSubject has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function updateScoreRuleDivisionSubject(
                        IFormInterface $Stage = null,
                        TblScoreRule $tblScoreRule,
                        TblYear $tblYear = null,
                        $Data = null
                Severity: Minor
                Found in Application/Education/Graduation/Gradebook/ScoreRule/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 hasPersonAllObligations has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
                Open

                    public static function hasPersonAllObligations(TblPerson $tblPerson, TblType $tblSchoolType, TblLevel $tblLevel, $list, $validateFirstLanguage, $hasOrientationSubjects)
                    {
                        $tblStudent = $tblPerson->getStudent();
                
                        // Keine 1. Fremdsprache hinterlegt.
                Severity: Minor
                Found in Application/Education/Lesson/Division/Filter/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 frontendFillAccidentReport has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function frontendFillAccidentReport($PersonId = null)
                    {
                
                        $Stage = new Stage('Schulbescheinigung', 'Erstellen');
                        $Stage->addButton(new Standard('Zurück', '/Document/Standard/EnrollmentDocument', new ChevronLeft()));

                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 createClassList has 231 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function createClassList($tblDivisionList)
                    {
                
                        $tblPersonList = false;
                        $tblYear = false;
                Severity: Major
                Found in Application/Reporting/Custom/BadDueben/Person/Service.php - About 1 day to fix

                  Method frontendSubjectPersonAdd has 231 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function frontendSubjectPersonAdd(
                          $Id = null,
                          $SubjectId = null,
                          $Group = null,
                          $DataAddPerson = null,
                  Severity: Major
                  Found in Application/Education/Lesson/Subject/Frontend.php - About 1 day to fix

                    File ApiAddressToPerson.php has 549 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    /**
                     * Created by PhpStorm.
                     * User: Kauschke
                     * Date: 04.01.2019
                    Severity: Major
                    Found in Application/Api/Contact/ApiAddressToPerson.php - About 1 day to fix

                      File Frontend.php has 548 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      namespace SPHERE\Application\Setting\Consumer\School;
                      
                      use SPHERE\Application\Contact\Address\Address;
                      use SPHERE\Application\Contact\Address\Service\Entity\TblToCompany;
                      Severity: Major
                      Found in Application/Setting/Consumer/School/Frontend.php - About 1 day to fix

                        Method validate has 228 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public static function validate(TblType $tblSchoolType, &$summary = array())
                            {
                                if (($tblSetting = Consumer::useService()->getSetting(
                                        'Reporting', 'KamenzReport', 'Validation', 'FirstForeignLanguageLevel'))
                                    && $tblSetting->getValue()
                        Severity: Major
                        Found in Application/Reporting/KamenzReport/KamenzService.php - About 1 day to fix

                          File Setup.php has 546 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          namespace SPHERE\Application\People\Meta\Student\Service;
                          
                          use Doctrine\DBAL\Schema\Schema;
                          use Doctrine\DBAL\Schema\Table;
                          Severity: Major
                          Found in Application/People/Meta/Student/Service/Setup.php - About 1 day to fix

                            Function formDebtorNumber has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function formDebtorNumber($Identifier = '', $PersonId = '', $DebtorNumberId = '')
                                {
                            
                                    // choose between Add and Edit
                                    $SaveButton = new Primary('Speichern', self::getEndpoint(), new Save());
                            Severity: Minor
                            Found in Application/Api/Billing/Accounting/ApiDebtor.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 frontendBalanceExcel has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function frontendBalanceExcel($Balance = array())
                                {
                            
                                    $Stage = new Stage('Belegdruck', 'Serienbrief');
                            
                            
                            Severity: Minor
                            Found in Application/Billing/Bookkeeping/Balance/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

                            Severity
                            Category
                            Status
                            Source
                            Language