DerDu/SPHERE-Framework

View on GitHub
Application/Api/Education/Certificate/Generator/Repository/EVSR/RadebeulOsJahreszeugnis.php

Summary

Maintainability
F
4 days
Test Coverage

File RadebeulOsJahreszeugnis.php has 563 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

    Method getOrientation has 160 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private static function getOrientation($personId, $TextSize = self::TEXT_SIZE, $IsGradeUnderlined = false)
        {
    
            $slice = new Slice();
            $sectionList = array();

      Method getBody has 151 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getBody($personId, $hasTransfer)
          {
              // zusammen 100%
              $width1 = '20%';
              $width2 = '45%';

        Method getSignIndividualPart has 132 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private static function getSignIndividualPart($personId)
            {
        
                $textSize = self::TEXT_SIZE;
                $fontFamily = self::FONT_FAMILY;

          Function getOrientation has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
          Open

              private static function getOrientation($personId, $TextSize = self::TEXT_SIZE, $IsGradeUnderlined = false)
              {
          
                  $slice = new Slice();
                  $sectionList = 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

          Method getHeader has 52 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function getHeader($name, $schoolType = '- Oberschule -', $extra = 'genehmigte')
              {
                  return (new Slice())
                      ->addSection((new Section())
                          ->addElementColumn((new Element())

            Consider simplifying this complex logical expression.
            Open

                    if (($tblDivision = $this->getTblDivision())
                        && ($tblLevel = $tblDivision->getTblLevel())
                        && intval($tblLevel->getName()) > 6
                        && ($tblPerson = Person::useService()->getPersonById($personId))
                        && ($tblStudent = $tblPerson->getStudent())

              Function getBody has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function getBody($personId, $hasTransfer)
                  {
                      // zusammen 100%
                      $width1 = '20%';
                      $width2 = '45%';

              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

              There are no issues that match your filters.

              Category
              Status