DerDu/SPHERE-Framework

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

Summary

Maintainability
F
3 wks
Test Coverage

File GymAbitur.php has 1804 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

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

        public function buildPages(TblPerson $tblPerson = null)
        {
    
            $personId = $tblPerson ? $tblPerson->getId() : 0;
    
    

      Function setExamRows has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
      Open

          private function setExamRows($personId, $isBellUsed)
          {
              $color = '#BBB';
              $sectionList = array();
      
      

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method setSubjectRow has 189 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function setSubjectRow($personId, $subjectName = '&nbsp;', $hasAdvancedCourse = true, $isLastRow = false)
          {
      
              $color = '#BBB';
              $isAdvancedSubject = false;

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

            private function getSchoolPartAbitur($personId, $MarginTop = '20px')
            {
        
                if (($tblSetting = Consumer::useService()->getSetting(
                        'Education', 'Certificate', 'Prepare', 'IsSchoolExtendedNameDisplayed'))

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

            private function setCourses(TblPerson $tblPerson = null)
            {
        
                $advancedCourses = array();
                $basicCourses = array();

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Method getExaminationsBoard has 139 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function getExaminationsBoard($marginTop, $textSize)
            {
        
                $leaderName = '&nbsp;';
                $leaderDescription = 'Vorsitzende(r)';

          Method setExamRows has 131 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private function setExamRows($personId, $isBellUsed)
              {
                  $color = '#BBB';
                  $sectionList = array();
          
          

            Function setSubjectRow has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
            Open

                private function setSubjectRow($personId, $subjectName = '&nbsp;', $hasAdvancedCourse = true, $isLastRow = false)
                {
            
                    $color = '#BBB';
                    $isAdvancedSubject = false;

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

                private function getForeignLanguages(TblPerson $tblPerson = null)
                {
            
                    $slice = new Slice();
                    $slice

              Method getSchoolPartAbitur has 109 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function getSchoolPartAbitur($personId, $MarginTop = '20px')
                  {
              
                      if (($tblSetting = Consumer::useService()->getSetting(
                              'Education', 'Certificate', 'Prepare', 'IsSchoolExtendedNameDisplayed'))

                Function getLevelTen has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                Open

                    private function getLevelTen(TblPerson $tblPerson = null)
                    {
                
                        $slice = new Slice();
                        $slice

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

                    private function getForeignLanguages(TblPerson $tblPerson = null)
                    {
                
                        $slice = new Slice();
                        $slice

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

                    public function buildPages(TblPerson $tblPerson = null)
                    {
                
                        $personId = $tblPerson ? $tblPerson->getId() : 0;
                
                

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

                    private function getLevelTen(TblPerson $tblPerson = null)
                    {
                
                        $slice = new Slice();
                        $slice

                  Function getExaminationsBoard has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private function getExaminationsBoard($marginTop, $textSize)
                      {
                  
                          $leaderName = '&nbsp;';
                          $leaderDescription = 'Vorsitzende(r)';

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

                      private function setPointsOverview($MarginTop = '25px')
                      {
                  
                          $textSize = '10px';
                          $slice = new Slice();

                    Method setCourses has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function setCourses(TblPerson $tblPerson = null)
                        {
                    
                            $advancedCourses = array();
                            $basicCourses = array();

                      Avoid deeply nested control flow statements.
                      Open

                                              if (($tblCompany = $tblStudentTransfer->getServiceTblCompany())) {
                                                  $place = '';
                                                  if (($tblAddress = $tblCompany->fetchMainAddress())
                                                      && ($tblCity = $tblAddress->getTblCity())
                                                  ) {
                      Severity: Major
                      Found in Application/Api/Education/Certificate/Generator/Repository/GymAbitur.php - About 45 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                    if (($tblPerson = Person::useService()->getPersonById($personId))
                                        && ($tblStudent = $tblPerson->getStudent())
                                        && ($tblStudentSubjectType = Student::useService()->getStudentSubjectTypeByIdentifier('RELIGION'))
                                        && ($tblStudentSubjectRanking = Student::useService()->getStudentSubjectRankingByIdentifier('1'))
                                        && ($tblStudentSubject = Student::useService()->getStudentSubjectByStudentAndSubjectAndSubjectRanking($tblStudent,
                        Severity: Major
                        Found in Application/Api/Education/Certificate/Generator/Repository/GymAbitur.php - About 40 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                                              if (($tblPrepareAdditionalGradeType = Prepare::useService()->getPrepareAdditionalGradeTypeByIdentifier('VERBAL_EXAM'))
                                                  && ($verbalExamGrade = Prepare::useService()->getPrepareAdditionalGradeByRanking(
                                                      $this->getTblPrepareCertificate(),
                                                      $tblPerson,
                                                      $tblPrepareAdditionalGradeType,
                          Severity: Major
                          Found in Application/Api/Education/Certificate/Generator/Repository/GymAbitur.php - About 40 mins to fix

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

                                private function setLevelTenRow(Slice $slice, $subject, $i, $grade, $gradeText)
                            Severity: Minor
                            Found in Application/Api/Education/Certificate/Generator/Repository/GymAbitur.php - About 35 mins to fix

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

                                      Section $section,
                                      $name,
                                      $textSize,
                                      $isBorderBottom = false,
                                      $isBorderRight = false
                              Severity: Minor
                              Found in Application/Api/Education/Certificate/Generator/Repository/GymAbitur.php - About 35 mins to fix

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

                                    private function setPointsOverview($MarginTop = '25px')
                                    {
                                
                                        $textSize = '10px';
                                        $slice = new Slice();
                                Application/Api/Education/Certificate/Generator/Repository/GymAbgSekII.php on lines 872..920
                                Application/Api/Education/Certificate/Generator/Repository/GymKurshalbjahreszeugnis.php on lines 480..528

                                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 519.

                                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 3 locations. Consider refactoring.
                                Open

                                    private function setCourses(TblPerson $tblPerson = null)
                                    {
                                
                                        $advancedCourses = array();
                                        $basicCourses = array();
                                Application/Api/Education/Certificate/Generator/Repository/EZSH/EzshKurshalbjahreszeugnis.php on lines 303..344
                                Application/Api/Education/Certificate/Generator/Repository/GymKurshalbjahreszeugnis.php on lines 182..223

                                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 264.

                                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 ($this->getTblPrepareCertificate()
                                            && ($tblGenerateCertificate = $this->getTblPrepareCertificate()->getServiceTblGenerateCertificate())
                                        ) {
                                
                                            if (($tblGenerateCertificateSettingLeader = Generate::useService()->getGenerateCertificateSettingBy($tblGenerateCertificate, 'Leader'))
                                Application/Api/Education/Certificate/Generator/Repository/MsAbsRs.php on lines 462..493

                                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 252.

                                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

                                        $pageList[] = (new Page())
                                            ->addSlice($Header)
                                            ->addSlice((new Slice())
                                                ->addElement((new Element())
                                                    ->setContent('ZEUGNIS')
                                Application/Api/Education/Certificate/Generator/Repository/GymAbgSekII.php on lines 130..172

                                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 144.

                                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 3 locations. Consider refactoring.
                                Open

                                        $pageList[] = (new Page())
                                            ->addSlice((new Slice())
                                                ->addSection((new Section())
                                                    ->addElementColumn((new Element())
                                                        ->setContent('Vor- und Zuname')
                                Application/Api/Education/Certificate/Generator/Repository/GymAbitur.php on lines 110..135
                                Application/Api/Education/Certificate/Generator/Repository/GymAbitur.php on lines 450..475

                                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 130.

                                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 3 locations. Consider refactoring.
                                Open

                                        $pageList[] = (new Page())
                                            ->addSlice((new Slice())
                                                ->addSection((new Section())
                                                    ->addElementColumn((new Element())
                                                        ->setContent('Vor- und Zuname')
                                Application/Api/Education/Certificate/Generator/Repository/GymAbitur.php on lines 110..135
                                Application/Api/Education/Certificate/Generator/Repository/GymAbitur.php on lines 627..652

                                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 130.

                                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 3 locations. Consider refactoring.
                                Open

                                        $pageList[] = (new Page())
                                            ->addSlice((new Slice())
                                                ->addSection((new Section())
                                                    ->addElementColumn((new Element())
                                                        ->setContent('Vor- und Zuname')
                                Application/Api/Education/Certificate/Generator/Repository/GymAbitur.php on lines 450..475
                                Application/Api/Education/Certificate/Generator/Repository/GymAbitur.php on lines 627..652

                                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 130.

                                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

                                    private function  getInfoForBlockII($marginTop = '45px')
                                    {
                                        $slice = new Slice();
                                        $slice
                                            ->addSection((new Section())
                                Application/Api/Education/Certificate/Generator/Repository/GymAbitur.php on lines 1976..1994

                                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 117.

                                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

                                    private function  getInfoForPageFour($marginTop = '10px')
                                    {
                                        $slice = new Slice();
                                        $slice
                                            ->addSection((new Section())
                                Application/Api/Education/Certificate/Generator/Repository/GymAbitur.php on lines 1951..1969

                                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 117.

                                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 3 locations. Consider refactoring.
                                Open

                                    private function setColumnElement(
                                        Section $section,
                                        $name,
                                        $textSize,
                                        $isBorderBottom = false,
                                Application/Api/Education/Certificate/Generator/Repository/GymAbgSekII.php on lines 929..947
                                Application/Api/Education/Certificate/Generator/Repository/GymKurshalbjahreszeugnis.php on lines 537..555

                                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 98.

                                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

                                    private function setInfoRow($i, $text)
                                    {
                                        $section = new Section();
                                        $section
                                            ->addElementColumn((new Element())
                                Application/Api/Education/Certificate/Generator/Repository/GymAbgSekII.php on lines 849..865

                                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 95.

                                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 und Ort der Schule:')
                                                    , '25%')
                                Application/Api/Education/Certificate/Generator/Certificate.php on lines 330..356

                                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