DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function createBasketVerificationBulk has a Cognitive Complexity of 120 (exceeds 5 allowed). Consider refactoring.
Open

    public function createBasketVerificationBulk(TblBasket $tblBasket, TblItem $tblItem, TblDivision $tblDivision = null, TblType $tblType = null)
    {

        $tblGroupList = $this->getGroupListByItem($tblItem);

Severity: Minor
Found in Application/Billing/Bookkeeping/Basket/Service.php - About 2 days 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 frontendEditProposalTestGrade has a Cognitive Complexity of 120 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendEditProposalTestGrade($DivisionId = null, $TaskId = null, $GradeTypeId = null, $Grade = null)
    {
        $stage = new Stage('Kopfnotenvorschlag des Klassenlehrers', 'Zensuren eintragen');

        if (!($tblDivision = Division::useService()->getDivisionById($DivisionId))) {
Severity: Minor
Found in Application/Education/Graduation/Evaluation/Frontend.php - About 2 days 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 createStudentsFromFile has 485 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function createStudentsFromFile(
        IFormInterface $Form = null,
        UploadedFile $File = null
    ) {

Severity: Major
Found in Application/Transfer/Import/Schulstiftung/Service.php - About 2 days to fix

    File MultiPassword.php has 971 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

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

      Method createStudentsFromFile has 481 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function createStudentsFromFile(
              IFormInterface $Form = null,
              UploadedFile $File = null,
              $TypeId = null,
              $YearId = null
      Severity: Major
      Found in Application/Transfer/Import/FuxMedia/Service.php - About 2 days to fix

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

            public function buildPages(TblPerson $tblPerson = null)
            {
        
                $PaddingTopInfo = '5px';
                $personId = $tblPerson ? $tblPerson->getId() : 0;
        Severity: Major
        Found in Application/Api/Education/Certificate/Generator/Repository/BeGs.php - About 2 days to fix

          Method createStudentsFromFile has 476 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function createStudentsFromFile(
                  IFormInterface $Form = null,
                  UploadedFile $File = null
              ) {
          
          
          Severity: Major
          Found in Application/Transfer/Import/Meerane/Service.php - About 2 days to fix

            Function getEZSHSubjectLanes has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring.
            Open

                protected function getEZSHSubjectLanes(
                    $personId,
                    $isSlice = true,
                    $languagesWithStartLevel = array(),
                    $isTitle = true,

            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 getStudentGradeList has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getStudentGradeList($TaskId = false)
                {
            
                    $tblTask = Evaluation::useService()->getTaskById($TaskId);
                    if (!$tblTask) {
            Severity: Minor
            Found in Application/Transfer/Indiware/Export/AppointmentGrade/Service.php - About 2 days 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 getFirstLetterContent has 472 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function getFirstLetterContent($Height = '500px')
                {
            
                    $Slice = new Slice();
                    if ($this->FieldValue['IsParent']) {

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

              <?php
              namespace SPHERE\Application\Transfer\Import\Dresden;
              
              use MOC\V\Component\Document\Component\Bridge\Repository\PhpExcel;
              use MOC\V\Component\Document\Document;
              Severity: Major
              Found in Application/Transfer/Import/Dresden/Service.php - About 2 days to fix

                Method getContent has 469 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/KamenzReportGS/E07.php - About 2 days to fix

                  Function updateListObjectElementList has a Cognitive Complexity of 116 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function updateListObjectElementList(
                          IFormInterface $Stage = null,
                          $Id = null,
                          $Data = null,
                          $HasData = null,
                  Severity: Minor
                  Found in Application/Reporting/CheckList/Service.php - About 2 days 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 buildDocument has 468 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function buildDocument($pageList = array())
                      {
                          $textSize = '16px';
                          $fontFamily = 'MetaPro';
                          $PaddingBottom = '18px';
                  Severity: Major
                  Found in Application/Api/Document/Custom/Radebeul/Repository/StudentCard.php - About 2 days to fix

                    File GymAbgSekII.php has 942 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    /**
                     * Created by PhpStorm.
                     * User: Kauschke
                     * Date: 18.05.2018

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

                      <?php
                      
                      namespace SPHERE\Application\Transfer\Import\Hormersdorf;
                      
                      
                      
                      Severity: Major
                      Found in Application/Transfer/Import/Hormersdorf/Service.php - About 2 days to fix

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

                        <?php
                        /**
                         * Created by PhpStorm.
                         * User: Kauschke
                         * Date: 07.06.2019
                        Severity: Major
                        Found in Application/Transfer/Import/Braeunsdorf/Service.php - About 2 days to fix

                          Method contentSelectedGradeBook has 463 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function contentSelectedGradeBook(
                                  Stage $Stage,
                                  TblDivisionSubject $tblDivisionSubject,
                                  $BasicRoute
                              ) {
                          Severity: Major
                          Found in Application/Education/Graduation/Gradebook/Frontend.php - About 2 days to fix

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

                            <?php
                            namespace SPHERE\Application\Education\Lesson\Subject;
                            
                            use SPHERE\Application\Education\Lesson\Division\Division;
                            use SPHERE\Application\Education\Lesson\Subject\Service\Entity\TblCategory;
                            Severity: Major
                            Found in Application/Education/Lesson/Subject/Frontend.php - About 2 days to fix

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

                                  public function buildPages(TblPerson $tblPerson = null)
                                  {
                              
                                      $personId = $tblPerson ? $tblPerson->getId() : 0;
                              
                              
                                Severity
                                Category
                                Status
                                Source
                                Language