DerDu/SPHERE-Framework

View on GitHub
Application/Api/Education/Certificate/Generator/Certificate.php

Summary

Maintainability
F
1 mo
Test Coverage

File Certificate.php has 2679 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

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

use MOC\V\Component\Template\Component\IBridgeInterface;
Severity: Major
Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 1 wk to fix

    Function getSubjectLanes has a Cognitive Complexity of 192 (exceeds 5 allowed). Consider refactoring.
    Open

        protected function getSubjectLanes(
            $personId,
            $isSlice = true,
            $languagesWithStartLevel = array(),
            $TextSize = '14px',
    Severity: Minor
    Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 3 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 getSubjectLanesCoswig has a Cognitive Complexity of 92 (exceeds 5 allowed). Consider refactoring.
    Open

        protected function getSubjectLanesCoswig(
            $personId,
            $isSlice = true,
            $languagesWithStartLevel = array(),
            $TextSize = '14px',
    Severity: Minor
    Found in Application/Api/Education/Certificate/Generator/Certificate.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 getSubjectLanesCustomForChemnitz has a Cognitive Complexity of 92 (exceeds 5 allowed). Consider refactoring.
    Open

        protected function getSubjectLanesCustomForChemnitz(
            $personId,
            $isSlice = true,
            $languagesWithStartLevel = array(),
            $TextSize = '14px',
    Severity: Minor
    Found in Application/Api/Education/Certificate/Generator/Certificate.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

    Method getSubjectLanes has 312 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function getSubjectLanes(
            $personId,
            $isSlice = true,
            $languagesWithStartLevel = array(),
            $TextSize = '14px',
    Severity: Major
    Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 1 day to fix

      Method getOrientationStandard has 264 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getOrientationStandard($personId, $TextSize = '14px', $IsGradeUnderlined = false)
          {
      
              $tblPerson = Person::useService()->getPersonById($personId);
      
      
      Severity: Major
      Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 1 day to fix

        Method getSubjectLanesCoswig has 211 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            protected function getSubjectLanesCoswig(
                $personId,
                $isSlice = true,
                $languagesWithStartLevel = array(),
                $TextSize = '14px',
        Severity: Major
        Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 1 day to fix

          Method getSubjectLanesCustomForChemnitz has 193 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function getSubjectLanesCustomForChemnitz(
                  $personId,
                  $isSlice = true,
                  $languagesWithStartLevel = array(),
                  $TextSize = '14px',
          Severity: Major
          Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 7 hrs to fix

            Method getObligationToVotePartCustomForCoswig has 187 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function getObligationToVotePartCustomForCoswig($personId, $TextSize = '14px', $IsGradeUnderlined = false)
                {
            
                    $tblPerson = Person::useService()->getPersonById($personId);
            
            
            Severity: Major
            Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 7 hrs to fix

              Method getProfileStandardNew has 177 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getProfileStandardNew($personId, $TextSize = '14px', $IsGradeUnderlined = false)
                  {
              
                      $tblPerson = Person::useService()->getPersonById($personId);
              
              
              Severity: Major
              Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 7 hrs to fix

                Method getProfileStandard has 170 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getProfileStandard($personId, $TextSize = '14px', $IsGradeUnderlined = false)
                    {
                
                        $tblPerson = Person::useService()->getPersonById($personId);
                
                
                Severity: Major
                Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 6 hrs to fix

                  Function getSubjectLanesForRadebeul has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected function getSubjectLanesForRadebeul(
                          $personId,
                          $TextColor = 'black',
                          $TextSize = '13px',
                          $GradeFieldBackgroundColor = 'rgb(224,226,231)',
                  Severity: Minor
                  Found in Application/Api/Education/Certificate/Generator/Certificate.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

                  Certificate has 44 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  abstract class Certificate extends Extension
                  {
                  
                      /** @var null|Frame $Certificate */
                      private $Certificate = null;
                  Severity: Minor
                  Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 6 hrs to fix

                    Method getSignPart has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        protected function getSignPart($personId, $isExtended = true, $MarginTop = '25px')
                        {
                            $SignSlice = (new Slice());
                            if ($isExtended) {
                                $SignSlice->addSection((new Section())
                    Severity: Major
                    Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 4 hrs to fix

                      Function getObligationToVotePartCustomForCoswig has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                      Open

                          protected function getObligationToVotePartCustomForCoswig($personId, $TextSize = '14px', $IsGradeUnderlined = false)
                          {
                      
                              $tblPerson = Person::useService()->getPersonById($personId);
                      
                      
                      Severity: Minor
                      Found in Application/Api/Education/Certificate/Generator/Certificate.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

                      Function getProfileStandard has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function getProfileStandard($personId, $TextSize = '14px', $IsGradeUnderlined = false)
                          {
                      
                              $tblPerson = Person::useService()->getPersonById($personId);
                      
                      
                      Severity: Minor
                      Found in Application/Api/Education/Certificate/Generator/Certificate.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

                      Function getOrientationStandard has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function getOrientationStandard($personId, $TextSize = '14px', $IsGradeUnderlined = false)
                          {
                      
                              $tblPerson = Person::useService()->getPersonById($personId);
                      
                      
                      Severity: Minor
                      Found in Application/Api/Education/Certificate/Generator/Certificate.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

                      Function getSchoolName has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                      Open

                          protected function getSchoolName($personId, $MarginTop = '20px')
                          {
                      
                              if (($tblSetting = \SPHERE\Application\Setting\Consumer\Consumer::useService()->getSetting(
                                  'Education', 'Certificate', 'Prepare', 'IsSchoolExtendedNameDisplayed'))
                      Severity: Minor
                      Found in Application/Api/Education/Certificate/Generator/Certificate.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

                      Method getSubjectLanesForRadebeul has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          protected function getSubjectLanesForRadebeul(
                              $personId,
                              $TextColor = 'black',
                              $TextSize = '13px',
                              $GradeFieldBackgroundColor = 'rgb(224,226,231)',
                      Severity: Major
                      Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 4 hrs to fix

                        Function getGradeLanesForRadebeul has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                        Open

                            protected function getGradeLanesForRadebeul(
                                $personId,
                                $TextColor = 'black',
                                $TextSize = '13px',
                                $GradeFieldBackgroundColor = 'rgb(224,226,231)',
                        Severity: Minor
                        Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 3 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 getGradeLanesCoswig has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                        Open

                            protected function getGradeLanesCoswig(
                                $personId,
                                $TextSize = '14px',
                                $IsGradeUnderlined = false,
                                $MarginTop = '15px'
                        Severity: Minor
                        Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 3 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 getGradeLanes has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                        Open

                            protected function getGradeLanes($personId, $TextSize = '14px', $IsGradeUnderlined = false, $MarginTop = '15px')
                            {
                        
                                $GradeSlice = (new Slice());
                        
                        
                        Severity: Minor
                        Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 3 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 getGradeLanesCustomForChemnitz has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                        Open

                            protected function getGradeLanesCustomForChemnitz(
                                $personId,
                                $TextSize = '14px',
                                $IsGradeUnderlined = false,
                                $MarginTop = '15px'
                        Severity: Minor
                        Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 3 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

                        Method getGradeLanesCustomForChemnitz has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            protected function getGradeLanesCustomForChemnitz(
                                $personId,
                                $TextSize = '14px',
                                $IsGradeUnderlined = false,
                                $MarginTop = '15px'
                        Severity: Major
                        Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 2 hrs to fix

                          Method getGradeLanesForRadebeul has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              protected function getGradeLanesForRadebeul(
                                  $personId,
                                  $TextColor = 'black',
                                  $TextSize = '13px',
                                  $GradeFieldBackgroundColor = 'rgb(224,226,231)',
                          Severity: Major
                          Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 2 hrs to fix

                            Function getProfileStandardNew has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function getProfileStandardNew($personId, $TextSize = '14px', $IsGradeUnderlined = false)
                                {
                            
                                    $tblPerson = Person::useService()->getPersonById($personId);
                            
                            
                            Severity: Minor
                            Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 2 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

                            Method getGradeLanesCoswig has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                protected function getGradeLanesCoswig(
                                    $personId,
                                    $TextSize = '14px',
                                    $IsGradeUnderlined = false,
                                    $MarginTop = '15px'
                            Severity: Major
                            Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 2 hrs to fix

                              Method getSchoolName has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  protected function getSchoolName($personId, $MarginTop = '20px')
                                  {
                              
                                      if (($tblSetting = \SPHERE\Application\Setting\Consumer\Consumer::useService()->getSetting(
                                          'Education', 'Certificate', 'Prepare', 'IsSchoolExtendedNameDisplayed'))
                              Severity: Major
                              Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 2 hrs to fix

                                Method getGradeLanes has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    protected function getGradeLanes($personId, $TextSize = '14px', $IsGradeUnderlined = false, $MarginTop = '15px')
                                    {
                                
                                        $GradeSlice = (new Slice());
                                
                                
                                Severity: Major
                                Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 2 hrs to fix

                                  Function buildCertificate has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public function buildCertificate($PageList = array())
                                      {
                                  
                                          $document = new Document();
                                  
                                  
                                  Severity: Minor
                                  Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 2 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

                                  Method getHeadSlice has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      protected function getHeadSlice($IsSample, $picturePath = '', $with = '100%', $height = '100%')
                                      {
                                          if ($picturePath != '') {
                                              if ($IsSample) {
                                                  $Header = (new Slice())
                                  Severity: Major
                                  Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 2 hrs to fix

                                    Method getInfo has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        protected function getInfo(
                                            $MarginTop = '10px',
                                            $LineOne = '',
                                            $LineTwo = '',
                                            $LineThree = '',
                                    Severity: Minor
                                    Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 2 hrs to fix

                                      Method getDescriptionHead has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          protected function getDescriptionHead($personId, $isMissing = false)
                                          {
                                              $DescriptionSlice = (new Slice());
                                              if ($isMissing) {
                                                  $DescriptionSlice->addSection((new Section())
                                      Severity: Minor
                                      Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 1 hr to fix

                                        Method buildCertificate has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function buildCertificate($PageList = array())
                                            {
                                        
                                                $document = new Document();
                                        
                                        
                                        Severity: Minor
                                        Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 1 hr to fix

                                          Method getSubjectLanesForRadebeul has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                          Open

                                                  $personId,
                                                  $TextColor = 'black',
                                                  $TextSize = '13px',
                                                  $GradeFieldBackgroundColor = 'rgb(224,226,231)',
                                                  $IsGradeUnderlined = false,
                                          Severity: Major
                                          Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 1 hr to fix

                                            Method setCheckBox has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                protected function setCheckBox($content = '&nbsp;', $thicknessInnerLines = '0.5px')
                                                {
                                                    return (new Slice())
                                                        ->addSection((new Section())
                                                            ->addElementColumn((new Element())
                                            Severity: Minor
                                            Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 1 hr to fix

                                              Consider simplifying this complex logical expression.
                                              Open

                                                                  if (isset($languagesWithStartLevel['Lane']) && isset($languagesWithStartLevel['Rank'])
                                                                      && $languagesWithStartLevel['Lane'] == $Lane && $languagesWithStartLevel['Rank'] == $count
                                                                  ) {
                                                                      $hasAdditionalLine['Lane'] = $Lane;
                                                                      $hasAdditionalLine['Ranking'] = 2;
                                              Severity: Major
                                              Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 1 hr to fix

                                                Consider simplifying this complex logical expression.
                                                Open

                                                                if (($tblConsumer = \SPHERE\Application\Platform\Gatekeeper\Authorization\Consumer\Consumer::useService()->getConsumerBySession())
                                                                    && $tblConsumer->getAcronym() == 'ESZC'
                                                                ) {
                                                                    if (strpos(strtolower($tblSubject->getName()), 'naturwissen') !== false
                                                                        && $this->getTblDivision()
                                                Severity: Major
                                                Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 1 hr to fix

                                                  Method getGradeLanesForRadebeul has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                  Open

                                                          $personId,
                                                          $TextColor = 'black',
                                                          $TextSize = '13px',
                                                          $GradeFieldBackgroundColor = 'rgb(224,226,231)',
                                                          $IsGradeUnderlined = false,
                                                  Severity: Major
                                                  Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 1 hr to fix

                                                    Method getSubjectLanes has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open

                                                            $personId,
                                                            $isSlice = true,
                                                            $languagesWithStartLevel = array(),
                                                            $TextSize = '14px',
                                                            $IsGradeUnderlined = false,
                                                    Severity: Major
                                                    Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 50 mins to fix

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                              if (($tblStudentSubjectType = Student::useService()->getStudentSubjectTypeByIdentifier('FOREIGN_LANGUAGE'))
                                                                                  && ($tblStudentSubjectList = Student::useService()->getStudentSubjectAllByStudentAndSubjectType($tblStudent,
                                                                                      $tblStudentSubjectType))
                                                                              ) {
                                                                                  /** @var TblStudentSubject $tblStudentSubject */
                                                      Severity: Major
                                                      Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 45 mins to fix

                                                        Method getInfo has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                        Open

                                                                $MarginTop = '10px',
                                                                $LineOne = '',
                                                                $LineTwo = '',
                                                                $LineThree = '',
                                                                $LineFour = '',
                                                        Severity: Minor
                                                        Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 45 mins to fix

                                                          Function getHeadSlice has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                          Open

                                                              protected function getHeadSlice($IsSample, $picturePath = '', $with = '100%', $height = '100%')
                                                              {
                                                                  if ($picturePath != '') {
                                                                      if ($IsSample) {
                                                                          $Header = (new Slice())
                                                          Severity: Minor
                                                          Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 45 mins 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

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                                          if ($hasSecondLanguageSecondarySchool)  {
                                                                                              // SSW-484
                                                                                              $tillLevel = $tblStudentSubject->getServiceTblLevelTill();
                                                                                              $fromLevel = $tblStudentSubject->getServiceTblLevelFrom();
                                                                                              if (($tblDivision = $this->getTblDivision())
                                                          Severity: Major
                                                          Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                                    if (($tblCompany = $tblStudentTransfer->getServiceTblCompany())) {
                                                                                        $name = $isSchoolExtendedNameDisplayed ? $tblCompany->getName() .
                                                                                            ($separator ? ' ' . $separator . ' ' : ' ') . $tblCompany->getExtendedName() : $tblCompany->getName();
                                                                                        if (strlen($name) > 60) {
                                                                                            $isLargeCompanyName = true;
                                                            Severity: Major
                                                            Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                                              if ($tblStudentSubject->getTblStudentSubjectRanking()
                                                                                                  && $tblStudentSubject->getTblStudentSubjectRanking()->getIdentifier() == '2'
                                                                                                  && ($tblSubjectForeignLanguage = $tblStudentSubject->getServiceTblSubject())
                                                                                              ) {
                                                                                                  $tblSecondForeignLanguage = $tblSubjectForeignLanguage;
                                                              Severity: Major
                                                              Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 45 mins to fix

                                                                Avoid deeply nested control flow statements.
                                                                Open

                                                                                                if ($hasSecondLanguageDiploma) {
                                                                                                    $tblSecondForeignLanguageDiploma = $tblSubjectForeignLanguage;
                                                                                                }
                                                                Severity: Major
                                                                Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 45 mins to fix

                                                                  Avoid deeply nested control flow statements.
                                                                  Open

                                                                                          if (($tblStudentSubjectType = Student::useService()->getStudentSubjectTypeByIdentifier('FOREIGN_LANGUAGE'))
                                                                                              && ($tblStudentSubjectList = Student::useService()->getStudentSubjectAllByStudentAndSubjectType($tblStudent,
                                                                                                  $tblStudentSubjectType))
                                                                                          ) {
                                                                                              /** @var TblStudentSubject $tblStudentSubject */
                                                                  Severity: Major
                                                                  Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 45 mins to fix

                                                                    Method getSubjectLanesCustomForChemnitz has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                    Open

                                                                            $personId,
                                                                            $isSlice = true,
                                                                            $languagesWithStartLevel = array(),
                                                                            $TextSize = '14px',
                                                                            $IsGradeUnderlined = false
                                                                    Severity: Minor
                                                                    Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 35 mins to fix

                                                                      Method getSubjectLanesCoswig has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                      Open

                                                                              $personId,
                                                                              $isSlice = true,
                                                                              $languagesWithStartLevel = array(),
                                                                              $TextSize = '14px',
                                                                              $IsGradeUnderlined = false
                                                                      Severity: Minor
                                                                      Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 35 mins to fix

                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                        Open

                                                                            public function getOrientationStandard($personId, $TextSize = '14px', $IsGradeUnderlined = false)
                                                                            {
                                                                        
                                                                                $tblPerson = Person::useService()->getPersonById($personId);
                                                                        
                                                                        
                                                                        Application/Api/Education/Certificate/Generator/Repository/CMS/CmsStyle.php on lines 447..747

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 1861.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                        Open

                                                                            protected function getSignPart($personId, $isExtended = true, $MarginTop = '25px')
                                                                            {
                                                                                $SignSlice = (new Slice());
                                                                                if ($isExtended) {
                                                                                    $SignSlice->addSection((new Section())
                                                                        Application/Api/Education/Certificate/Generator/Repository/ESRL/EsrlStyle.php on lines 442..566

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 617.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                        Open

                                                                                    if (!empty($languagesWithStartLevel)) {
                                                                                        if (isset($languagesWithStartLevel['Lane']) && isset($languagesWithStartLevel['Rank'])) {
                                                                                            $SubjectStructure[$languagesWithStartLevel['Rank']]
                                                                                            [$languagesWithStartLevel['Lane']]['SubjectAcronym'] = 'Empty';
                                                                                            $SubjectStructure[$languagesWithStartLevel['Rank']]
                                                                        Application/Api/Education/Certificate/Generator/Certificate.php on lines 974..1003

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 253.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                        Open

                                                                                    if (!empty($languagesWithStartLevel)) {
                                                                                        if (isset($languagesWithStartLevel['Lane']) && isset($languagesWithStartLevel['Rank'])) {
                                                                                            $SubjectStructure[$languagesWithStartLevel['Rank']]
                                                                                            [$languagesWithStartLevel['Lane']]['SubjectAcronym'] = 'Empty';
                                                                                            $SubjectStructure[$languagesWithStartLevel['Rank']]
                                                                        Application/Api/Education/Certificate/Generator/Certificate.php on lines 2927..2956

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 253.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                        Open

                                                                            protected function getDivisionAndYear($personId, $MarginTop = '20px', $YearString = 'Schuljahr')
                                                                            {
                                                                                $YearDivisionSlice = (new Slice());
                                                                                $YearDivisionSlice->addSection((new Section())
                                                                                    ->addElementColumn((new Element())
                                                                        Application/Api/Education/Certificate/Generator/Repository/EVGSM/GsHjInfo.php on lines 84..118

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 185.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                        Open

                                                                            protected function setCheckBox($content = '&nbsp;', $thicknessInnerLines = '0.5px')
                                                                            {
                                                                                return (new Slice())
                                                                                    ->addSection((new Section())
                                                                                        ->addElementColumn((new Element())
                                                                        Application/Api/Document/AbstractDocument.php on lines 856..888

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 176.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                                        Open

                                                                                    foreach ($tblCertificateSubjectAll as $tblCertificateSubject) {
                                                                                        $tblSubject = $tblCertificateSubject->getServiceTblSubject();
                                                                                        if($tblSubject){
                                                                                            // Grade Exists? => Add Subject to Certificate
                                                                                            if (isset($tblGradeList['Data'][$tblSubject->getAcronym()])) {
                                                                        Application/Api/Education/Certificate/Generator/Certificate.php on lines 552..571
                                                                        Application/Api/Education/Certificate/Generator/Certificate.php on lines 950..970
                                                                        Application/Api/Education/Certificate/Generator/Repository/CMS/CmsStyle.php on lines 314..333
                                                                        Application/Api/Education/Certificate/Generator/Repository/ESRL/EsrlStyle.php on lines 241..260
                                                                        Application/Api/Education/Certificate/Generator/Repository/ESS/EssStyle.php on lines 131..150
                                                                        Application/Api/Education/Certificate/Generator/Repository/EZSH/EzshStyle.php on lines 324..343

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 162.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                                        Open

                                                                                    foreach ($tblCertificateSubjectAll as $tblCertificateSubject) {
                                                                                        $tblSubject = $tblCertificateSubject->getServiceTblSubject();
                                                                                        if ($tblSubject) {
                                                                                            // Grade Exists? => Add Subject to Certificate
                                                                                            if (isset($tblGradeList['Data'][$tblSubject->getAcronym()])) {
                                                                        Application/Api/Education/Certificate/Generator/Certificate.php on lines 950..970
                                                                        Application/Api/Education/Certificate/Generator/Certificate.php on lines 2904..2923
                                                                        Application/Api/Education/Certificate/Generator/Repository/CMS/CmsStyle.php on lines 314..333
                                                                        Application/Api/Education/Certificate/Generator/Repository/ESRL/EsrlStyle.php on lines 241..260
                                                                        Application/Api/Education/Certificate/Generator/Repository/ESS/EssStyle.php on lines 131..150
                                                                        Application/Api/Education/Certificate/Generator/Repository/EZSH/EzshStyle.php on lines 324..343

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 162.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                                        Open

                                                                                    foreach ($tblCertificateSubjectAll as $tblCertificateSubject) {
                                                                                        $tblSubject = $tblCertificateSubject->getServiceTblSubject();
                                                                                        if($tblSubject){
                                                                                            // Grade Exists? => Add Subject to Certificate
                                                                                            if (isset($tblGradeList['Data'][$tblSubject->getAcronym()])) {
                                                                        Application/Api/Education/Certificate/Generator/Certificate.php on lines 552..571
                                                                        Application/Api/Education/Certificate/Generator/Certificate.php on lines 2904..2923
                                                                        Application/Api/Education/Certificate/Generator/Repository/CMS/CmsStyle.php on lines 314..333
                                                                        Application/Api/Education/Certificate/Generator/Repository/ESRL/EsrlStyle.php on lines 241..260
                                                                        Application/Api/Education/Certificate/Generator/Repository/ESS/EssStyle.php on lines 131..150
                                                                        Application/Api/Education/Certificate/Generator/Repository/EZSH/EzshStyle.php on lines 324..343

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 162.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                        Open

                                                                                    if ($IsSample) {
                                                                                        $Header = (new Slice())
                                                                                            ->addSection((new Section())
                                                                                                ->addElementColumn((new Element())
                                                                                                    , '25%'
                                                                        Application/Api/Education/Certificate/Generator/Repository/MsAbsRs.php on lines 691..712

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 136.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                        Open

                                                                                            if (strlen($Subject['SubjectName']) > 20 && preg_match('!\s!', $Subject['SubjectName'])) {
                                                                                                $SubjectSection->addElementColumn((new Element())
                                                                                                    ->setContent('{% if(Content.P' . $personId . '.Grade.Data["'.$Subject['SubjectAcronym'].'"] is not empty) %}
                                                                                                                     {{ Content.P' . $personId . '.Grade.Data["'.$Subject['SubjectAcronym'].'"] }}
                                                                                                                 {% else %}
                                                                        Application/Api/Education/Certificate/Generator/Certificate.php on lines 2727..2744

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 133.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                        Open

                                                                                            } else {
                                                                                                $SubjectSection->addElementColumn((new Element())
                                                                                                    ->setContent('{% if(Content.P' . $personId . '.Grade.Data["'.$Subject['SubjectAcronym'].'"] is not empty) %}
                                                                                                                     {{ Content.P' . $personId . '.Grade.Data["' . $Subject['SubjectAcronym'] . '"] }}
                                                                                                                 {% else %}
                                                                        Application/Api/Education/Certificate/Generator/Certificate.php on lines 2710..2744

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 133.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                        Open

                                                                                    } elseif ($elementOrientationName) {
                                                                                        $section = new Section();
                                                                                        $section
                                                                                            ->addElementColumn($elementOrientationName, '39%')
                                                                                            ->addElementColumn($elementOrientationGrade, '9%')
                                                                        Application/Api/Education/Certificate/Generator/Certificate.php on lines 3321..3340

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 124.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                        Open

                                                                                    } elseif ($elementForeignLanguageName) {
                                                                                        $section = new Section();
                                                                                        $section
                                                                                            ->addElementColumn($elementForeignLanguageName, '39%')
                                                                                            ->addElementColumn($elementForeignLanguageGrade, '9%')
                                                                        Application/Api/Education/Certificate/Generator/Certificate.php on lines 3302..3321

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 124.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                        Open

                                                                                if ($tblSubjectProfile && !$tblSubjectForeign) {
                                                                                    $elementName = (new Element())
                                                                                        // Profilname aus der Schülerakte
                                                                                        // bei einem Leerzeichen im Acronymn stürzt das TWIG ab
                                                                                        ->setContent('
                                                                        Application/Api/Education/Certificate/Generator/Certificate.php on lines 2070..2129

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 103.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                        Open

                                                                                if ($tblSubjectForeign) {
                                                                                    $elementForeignName = (new Element())
                                                                                        // Profilname aus der Schülerakte
                                                                                        // bei einem Leerzeichen im Acronymn stürzt das TWIG ab
                                                                                        ->setContent($tblSubjectForeign->getName())
                                                                        Application/Api/Education/Certificate/Generator/Certificate.php on lines 2020..2068

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 103.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                        Open

                                                                                            $SubjectSection->addElementColumn((new Element())
                                                                                                ->setContent($hasAdditionalLine['Ranking'] . '. Fremdsprache (ab Klassenstufe ' .
                                                                                                    '{% if(Content.P' . $personId . '.Subject.Level["' . $hasAdditionalLine['SubjectAcronym'] . '"] is not empty) %}
                                                                                                             {{ Content.P' . $personId . '.Subject.Level["' . $hasAdditionalLine['SubjectAcronym'] . '"] }}
                                                                                                         {% else %}
                                                                        Severity: Minor
                                                                        Found in Application/Api/Education/Certificate/Generator/Certificate.php and 1 other location - About 50 mins to fix
                                                                        Application/Api/Education/Certificate/Generator/Certificate.php on lines 3095..3107

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 97.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                        Open

                                                                                            $SubjectSection->addElementColumn((new Element())
                                                                                                ->setContent($hasAdditionalLine['Ranking'] . '. Fremdsprache (ab Klassenstufe ' .
                                                                                                    '{% if(Content.P' . $personId . '.Subject.Level["' . $hasAdditionalLine['SubjectAcronym'] . '"] is not empty) %}
                                                                                                             {{ Content.P' . $personId . '.Subject.Level["' . $hasAdditionalLine['SubjectAcronym'] . '"] }}
                                                                                                         {% else %}
                                                                        Severity: Minor
                                                                        Found in Application/Api/Education/Certificate/Generator/Certificate.php and 1 other location - About 50 mins to fix
                                                                        Application/Api/Education/Certificate/Generator/Certificate.php on lines 1148..1160

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 97.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                        Open

                                                                                if ($isLargeCompanyName) {
                                                                                    $SchoolSlice->addSection((new Section())
                                                                                        ->addElementColumn((new Element())
                                                                                            ->setContent('Name der Schule:')
                                                                                            , '18%')
                                                                        Severity: Minor
                                                                        Found in Application/Api/Education/Certificate/Generator/Certificate.php and 1 other location - About 40 mins to fix
                                                                        Application/Api/Education/Certificate/Generator/Repository/GymAbitur.php on lines 1320..1346

                                                                        Duplicated Code

                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                        Tuning

                                                                        This issue has a mass of 94.

                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                        Refactorings

                                                                        Further Reading

                                                                        There are no issues that match your filters.

                                                                        Category
                                                                        Status