DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function createLevelDivision has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

    public function createLevelDivision(
        IFormInterface $Form,
        $Level,
        $Division
    ) {
Severity: Minor
Found in Application/Education/Lesson/Division/Service.php - About 4 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 CheJGs.php has 364 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace SPHERE\Application\Api\Education\Certificate\Generator\Repository\ESZC;

use SPHERE\Application\Api\Education\Certificate\Generator\Certificate;

    Method getCMSTeacher has 118 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function getCMSTeacher($personId, $isExtended = true, $MarginTop = '25px')
        {
            $SignSlice = (new Slice());
            if ($isExtended) {
                $SignSlice->addSection((new Section())

      Method getSignIn has 118 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function getSignIn()
          {
      
              $Slice = new Slice();
              $StudentCall = 'Der/Die';

        Method createSerialLetterCompanyExcel has 118 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function createSerialLetterCompanyExcel(TblSerialLetter $tblSerialLetter)
            {
        
                $ExportData = array();
                $tblSerialCompanyList = $this->getSerialCompanyBySerialLetter($tblSerialLetter, false);
        Severity: Major
        Found in Application/Reporting/SerialLetter/Service.php - About 4 hrs to fix

          Method frontendUpload has 118 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function frontendUpload(UploadedFile $File = null, $tblYear = null)
              {
          
                  $Stage = new Stage('Indiware', 'Daten importieren');
                  $Stage->setMessage('Lehraufträge importieren');
          Severity: Major
          Found in Application/Transfer/Indiware/Import/Lectureship.php - About 4 hrs to fix

            Method formGenerate has 118 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function formGenerate(TblYear $tblYear = null)
                {
            
                    $certificateTypeList = array();
                    $tblCertificateTypeAll = Generator::useService()->getCertificateTypeAll();
            Severity: Major
            Found in Application/Education/Certificate/Generate/Frontend.php - About 4 hrs to fix

              Method frontendDroppedSubjects has 118 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function frontendDroppedSubjects($PrepareId = null, $GroupId = null, $PersonId = null, $Route = null, $Data = null)
                  {
              
                      if ($GroupId) {
                          $tblGroup = Group::useService()->getGroupById($GroupId);
              Severity: Major
              Found in Application/Education/Certificate/Prepare/Frontend.php - About 4 hrs to fix

                Method frontendPrepareDiplomaAbiturBlockI has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function frontendPrepareDiplomaAbiturBlockI(
                        $PrepareId = null,
                        $GroupId = null,
                        $PersonId = null,
                        $View = BlockIView::PREVIEW,
                Severity: Major
                Found in Application/Education/Certificate/Prepare/Abitur/Frontend.php - About 4 hrs to fix

                  File SerialLetterForm.php has 362 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  namespace SPHERE\Application\Reporting\SerialLetter;
                  
                  use SPHERE\Application\Corporation\Company\Company;
                  use SPHERE\Application\Education\Lesson\Division\Division;
                  Severity: Minor
                  Found in Application/Reporting/SerialLetter/SerialLetterForm.php - About 4 hrs to fix

                    Method frontendGenerate has 117 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function frontendGenerate($IsAllYears = false, $YearId = null, $Data = null)
                        {
                    
                            $Stage = new Stage('Zeugnis generieren', 'Übersicht');
                    
                    
                    Severity: Major
                    Found in Application/Education/Certificate/Generate/Frontend.php - About 4 hrs to fix

                      Method formStudentDocument has 117 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function formStudentDocument($Gender)
                          {
                      //        $Data[] = 'BohrEy';
                      
                              return new Form(
                      Severity: Major
                      Found in Application/Document/Custom/Zwickau/Zwickau.php - About 4 hrs to fix

                        Data has 36 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class Data extends AbstractData
                        {
                        
                            public function setupDatabaseContent()
                            {
                        Severity: Minor
                        Found in Application/Reporting/CheckList/Service/Data.php - About 4 hrs to fix

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

                          class Service extends AbstractService
                          {
                          
                              /**
                               * @param bool $doSimulation
                          Severity: Minor
                          Found in Application/Billing/Bookkeeping/Basket/Service.php - About 4 hrs to fix

                            TblBasket has 36 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class TblBasket extends Element
                            {
                            
                                const ATTR_NAME = 'Name';
                                const ATTR_MONTH = 'Month';
                            Severity: Minor
                            Found in Application/Billing/Bookkeeping/Basket/Service/Entity/TblBasket.php - About 4 hrs to fix

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

                              <?php
                              namespace SPHERE\Application\Education\Certificate\Generator;
                              
                              use SPHERE\Application\Education\Certificate\Generator\Service\Data;
                              use SPHERE\Application\Education\Certificate\Generator\Service\Entity\TblCertificate;
                              Severity: Minor
                              Found in Application/Education/Certificate/Generator/Service.php - About 4 hrs to fix

                                Method buildPage has 116 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function buildPage()
                                    {
                                        $SmallTextSize = '7px';
                                        $InputText = '12px';
                                        $thicknessOutLines = '1.2px';

                                  Method frontendCompanyAddressContent has 116 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private function frontendCompanyAddressContent($Id = null)
                                      {
                                  
                                          $Stage = new Stage('Adresslisten für Serienbriefe', 'Person mit Adressen auswählen');
                                          $Stage->addButton(new Standard('Zurück', '/Reporting/SerialLetter', new ChevronLeft()));
                                  Severity: Major
                                  Found in Application/Reporting/SerialLetter/Frontend.php - About 4 hrs to fix

                                    File ViewStudentCustody.php has 360 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    <?php
                                    
                                    namespace SPHERE\Application\Reporting\Individual\Service\Entity;
                                    
                                    use Doctrine\ORM\Mapping\Cache;

                                      File ViewProspectCustody.php has 360 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      <?php
                                      
                                      namespace SPHERE\Application\Reporting\Individual\Service\Entity;
                                      
                                      use Doctrine\ORM\Mapping\Cache;
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language