DerDu/SPHERE-Framework

View on GitHub
Application/Setting/User/Account/Frontend.php

Summary

Maintainability
F
3 wks
Test Coverage

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

<?php
namespace SPHERE\Application\Setting\User\Account;

use SPHERE\Application\Api\Contact\ApiContactAddress;
use SPHERE\Application\Api\Setting\UserAccount\ApiUserAccount;
Severity: Major
Found in Application/Setting/User/Account/Frontend.php - About 3 days to fix

    Function getCustodyTableContent has a Cognitive Complexity of 81 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getCustodyTableContent($Result, $MaxResult = 800, $TypeId = null)
        {
    
            $SearchResult = array();
            if (!empty($Result)) {
    Severity: Minor
    Found in Application/Setting/User/Account/Frontend.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 getStudentTableContent has a Cognitive Complexity of 78 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getStudentTableContent($Result, $MaxResult = 800)
        {
    
            $SearchResult = array();
            if (!empty($Result)) {
    Severity: Minor
    Found in Application/Setting/User/Account/Frontend.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 getPdfForm has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
    Open

        private function getPdfForm(TblPerson $tblPerson, TblUserAccount $tblUserAccount, $IsParent = false)
        {
    
    //        $tblStudentCompanyId = false;
            $tblSchoolAll = School::useService()->getSchoolAll();
    Severity: Minor
    Found in Application/Setting/User/Account/Frontend.php - About 7 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 getPdfForm has 150 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function getPdfForm(TblPerson $tblPerson, TblUserAccount $tblUserAccount, $IsParent = false)
        {
    
    //        $tblStudentCompanyId = false;
            $tblSchoolAll = School::useService()->getSchoolAll();
    Severity: Major
    Found in Application/Setting/User/Account/Frontend.php - About 6 hrs to fix

      Method frontendCustodyShow has 94 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function frontendCustodyShow()
          {
              $Stage = new Stage('Sorgeberechtigten-Accounts', 'Übersicht');
      
              $Stage->addButton(new Standard('Zurück', '/Setting/User', new ChevronLeft()));
      Severity: Major
      Found in Application/Setting/User/Account/Frontend.php - About 3 hrs to fix

        Method frontendStudentShow has 90 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function frontendStudentShow()
            {
                $Stage = new Stage('Schüler-Accounts', 'Übersicht');
        
                $Stage->addButton(new Standard('Zurück', '/Setting/User', new ChevronLeft()));
        Severity: Major
        Found in Application/Setting/User/Account/Frontend.php - About 3 hrs to fix

          Method frontendDestroyPrepare has 90 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function frontendDestroyPrepare($Id = null, $Confirm = false)
              {
          
                  $Stage = new Stage('Benutzer', 'Löschen');
                  if ($Id) {
          Severity: Major
          Found in Application/Setting/User/Account/Frontend.php - About 3 hrs to fix

            Method frontendAccountExport has 90 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function frontendAccountExport($Time = null)
                {
            
                    $Stage = new Stage('Account', 'Serienbrief Export');
                    $Stage->setMessage('Neu erstellte Benutzerzugänge können auf dieser Seite als Excel-Datei für den 
            Severity: Major
            Found in Application/Setting/User/Account/Frontend.php - About 3 hrs to fix

              Method frontendStudentAdd has 88 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function frontendStudentAdd($Person = null, $Year = null, $Division = null)
                  {
              
                      $Stage = new Stage('Schüler-Accounts', 'Erstellen');
              
              
              Severity: Major
              Found in Application/Setting/User/Account/Frontend.php - About 3 hrs to fix

                Method frontendCustodyAdd has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function frontendCustodyAdd($Person = null, $Year = null, $Division = null, $TypeId = null)
                    {
                        $Stage = new Stage('Sorgeberechtigten-Accounts', 'Erstellen');
                
                        $form = $this->getCustodyFilterForm();
                Severity: Major
                Found in Application/Setting/User/Account/Frontend.php - About 3 hrs to fix

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

                      public function frontendDestroyPrepare($Id = null, $Confirm = false)
                      {
                  
                          $Stage = new Stage('Benutzer', 'Löschen');
                          if ($Id) {
                  Severity: Minor
                  Found in Application/Setting/User/Account/Frontend.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 frontendResetAccount has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function frontendResetAccount($Id = null, $Confirm = false, $Path = '/Setting/User')
                      {
                  
                          $Stage = new Stage('Account Passwort', 'zurücksetzen');
                          if ($Id) {
                  Severity: Major
                  Found in Application/Setting/User/Account/Frontend.php - About 3 hrs to fix

                    Function clearPassword has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function clearPassword($GroupByTime, $Confirm = false)
                        {
                            $Stage = new Stage('Benutzer', 'Klartext Passwörter');
                            if ($GroupByTime) {
                                $GroupByTime = new \DateTime($GroupByTime);
                    Severity: Minor
                    Found in Application/Setting/User/Account/Frontend.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 getStudentTableContent has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getStudentTableContent($Result, $MaxResult = 800)
                        {
                    
                            $SearchResult = array();
                            if (!empty($Result)) {
                    Severity: Major
                    Found in Application/Setting/User/Account/Frontend.php - About 2 hrs to fix

                      Method clearPassword has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function clearPassword($GroupByTime, $Confirm = false)
                          {
                              $Stage = new Stage('Benutzer', 'Klartext Passwörter');
                              if ($GroupByTime) {
                                  $GroupByTime = new \DateTime($GroupByTime);
                      Severity: Major
                      Found in Application/Setting/User/Account/Frontend.php - About 2 hrs to fix

                        Function frontendResetAccount has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function frontendResetAccount($Id = null, $Confirm = false, $Path = '/Setting/User')
                            {
                        
                                $Stage = new Stage('Account Passwort', 'zurücksetzen');
                                if ($Id) {
                        Severity: Minor
                        Found in Application/Setting/User/Account/Frontend.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 getCustodyTableContent has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getCustodyTableContent($Result, $MaxResult = 800, $TypeId = null)
                            {
                        
                                $SearchResult = array();
                                if (!empty($Result)) {
                        Severity: Major
                        Found in Application/Setting/User/Account/Frontend.php - About 2 hrs to fix

                          Method getStudentFilterResult has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function getStudentFilterResult($Person, $Year, $Division)
                              {
                          
                                  $Pile = new Pile(Pile::JOIN_TYPE_INNER);
                                  $Pile->addPile((new ViewPeopleGroupMember())->getViewService(), new ViewPeopleGroupMember(),
                          Severity: Major
                          Found in Application/Setting/User/Account/Frontend.php - About 2 hrs to fix

                            Method getCustodyFilterForm has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private function getCustodyFilterForm()
                                {
                                    $tblLevelShowList = array();
                            
                                    $tblLevelList = Division::useService()->getLevelAll();
                            Severity: Major
                            Found in Application/Setting/User/Account/Frontend.php - About 2 hrs to fix

                              Method frontendPasswordGeneration has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function frontendPasswordGeneration($Id = null, $Path = '/Setting/User', $IsParent = false, $Data = null)
                                  {
                              
                                      $Stage = new Stage('Account Passwort', 'neu generieren');
                                      if ($Id) {
                              Severity: Major
                              Found in Application/Setting/User/Account/Frontend.php - About 2 hrs to fix

                                Method getStudentFilterForm has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private function getStudentFilterForm()
                                    {
                                        $tblLevelShowList = array();
                                
                                        $tblLevelList = Division::useService()->getLevelAll();
                                Severity: Minor
                                Found in Application/Setting/User/Account/Frontend.php - About 1 hr to fix

                                  Method frontendDashboard has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function frontendDashboard()
                                      {
                                  
                                          $Stage = new Stage('Übersicht', 'Accounts');
                                  
                                  
                                  Severity: Minor
                                  Found in Application/Setting/User/Account/Frontend.php - About 1 hr to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if ($countRow >= $MaxResult) {
                                                                    break;
                                                                }
                                    Severity: Major
                                    Found in Application/Setting/User/Account/Frontend.php - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                      if ($tblPersonCustody && $tblPersonCustody->getId() != $tblPerson->getId()) {
                                                                          $CustodyList[] = new Container($tblPersonCustody->getLastFirstName());
                                                                      }
                                      Severity: Major
                                      Found in Application/Setting/User/Account/Frontend.php - About 45 mins to fix

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

                                            public function frontendPasswordGeneration($Id = null, $Path = '/Setting/User', $IsParent = false, $Data = null)
                                            {
                                        
                                                $Stage = new Stage('Account Passwort', 'neu generieren');
                                                if ($Id) {
                                        Severity: Minor
                                        Found in Application/Setting/User/Account/Frontend.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 ($tblTransferType) {
                                                                        $tblStudentTransfer = Student::useService()->getStudentTransferByType($tblStudent,
                                                                            $tblTransferType);
                                                                        if ($tblStudentTransfer && ($tblCourse = $tblStudentTransfer->getServiceTblCourse())) {
                                                                            $DataPerson['Course'] = $tblCourse->getName();
                                        Severity: Major
                                        Found in Application/Setting/User/Account/Frontend.php - About 45 mins to fix

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

                                              private function getStudentFilterResult($Person, $Year, $Division)
                                              {
                                          
                                                  $Pile = new Pile(Pile::JOIN_TYPE_INNER);
                                                  $Pile->addPile((new ViewPeopleGroupMember())->getViewService(), new ViewPeopleGroupMember(),
                                          Severity: Minor
                                          Found in Application/Setting/User/Account/Frontend.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 ($tblPersonStudent && $tblPersonStudent->getId() != $tblPerson->getId()) {
                                                                              $StudentList[] = new Container($tblPersonStudent->getLastFirstName());
                                                                          }
                                          Severity: Major
                                          Found in Application/Setting/User/Account/Frontend.php - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                        if(($tblType = $tblLevel->getServiceTblType()) && !in_array($tblType->getId(), $tblSchoolTypeList)){
                                                                            // Schüler Überspringen
                                                                            continue;
                                                                        }
                                            Severity: Major
                                            Found in Application/Setting/User/Account/Frontend.php - About 45 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                                  if (!array_key_exists($tblPerson->getId(), $SearchResult)){
                                                                                      if ($countRow >= $MaxResult){
                                                                                          break;
                                                                                      }
                                                                                      $countRow++;
                                              Severity: Major
                                              Found in Application/Setting/User/Account/Frontend.php - About 45 mins to fix

                                                Function getCustodyFilterForm has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                    private function getCustodyFilterForm()
                                                    {
                                                        $tblLevelShowList = array();
                                                
                                                        $tblLevelList = Division::useService()->getLevelAll();
                                                Severity: Minor
                                                Found in Application/Setting/User/Account/Frontend.php - About 35 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

                                                Function getStudentFilterForm has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                    private function getStudentFilterForm()
                                                    {
                                                        $tblLevelShowList = array();
                                                
                                                        $tblLevelList = Division::useService()->getLevelAll();
                                                Severity: Minor
                                                Found in Application/Setting/User/Account/Frontend.php - About 35 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

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

                                                                new FormRow(array(
                                                                    new FormColumn(
                                                                        new Panel('Kontaktinformation',array(
                                                                            (new TextField('Data[Phone]', '', 'Telefon'))->setRequired(),
                                                                            new TextField('Data[Fax]', '', 'Fax'),
                                                Severity: Major
                                                Found in Application/Setting/User/Account/Frontend.php and 1 other location - About 6 hrs to fix
                                                Application/Api/Setting/UserAccount/ApiUserAccount.php on lines 448..466

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

                                                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

                                                        $Stage->setContent(
                                                            new Layout(
                                                                new LayoutGroup(array(
                                                                    new LayoutRow(
                                                                        new LayoutColumn(new Well(
                                                Severity: Major
                                                Found in Application/Setting/User/Account/Frontend.php and 1 other location - About 4 hrs to fix
                                                Application/Setting/User/Account/Frontend.php on lines 214..248

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

                                                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

                                                        $Stage->setContent(
                                                            new Layout(
                                                                new LayoutGroup(array(
                                                                    new LayoutRow(
                                                                        new LayoutColumn(new Well(
                                                Severity: Major
                                                Found in Application/Setting/User/Account/Frontend.php and 1 other location - About 4 hrs to fix
                                                Application/Setting/User/Account/Frontend.php on lines 606..639

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

                                                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

                                                        $Stage->setContent(
                                                            new Layout(
                                                                new LayoutGroup(
                                                                    new LayoutRow(array(
                                                                        new LayoutColumn(
                                                Severity: Major
                                                Found in Application/Setting/User/Account/Frontend.php and 1 other location - About 4 hrs to fix
                                                Application/Setting/User/Account/Frontend.php on lines 1008..1037

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

                                                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

                                                        $Stage->setContent(
                                                            new Layout(
                                                                new LayoutGroup(
                                                                    new LayoutRow(array(
                                                                        new LayoutColumn(
                                                Severity: Major
                                                Found in Application/Setting/User/Account/Frontend.php and 1 other location - About 4 hrs to fix
                                                Application/Setting/User/Account/Frontend.php on lines 899..928

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

                                                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

                                                                new FormRow(array(
                                                                    new FormColumn(
                                                                        new Panel('Name der Schule',array(
                                                                            (new TextField('Data[CompanyName]', '', 'Name'))->setRequired(),
                                                                            new TextField('Data[CompanyExtendedName]', '', 'Namenszusatz')
                                                Severity: Major
                                                Found in Application/Setting/User/Account/Frontend.php and 1 other location - About 3 hrs to fix
                                                Application/Api/Setting/UserAccount/ApiUserAccount.php on lines 428..442

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

                                                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(($tblPhoneToCompanyList = Phone::useService()->getPhoneAllByCompany($tblCompany))){
                                                                $tblPhone = false;
                                                                $tblFax = false;
                                                                foreach($tblPhoneToCompanyList as $tblPhoneToCompany){
                                                                    if(($tblType = $tblPhoneToCompany->getTblType())
                                                Severity: Major
                                                Found in Application/Setting/User/Account/Frontend.php and 1 other location - About 2 hrs to fix
                                                Application/Api/Setting/UserAccount/ApiUserAccount.php on lines 311..330

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

                                                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

                                                        $formResult = new Form(new FormGroup(new FormRow(new FormColumn(
                                                            (isset($Year[ViewYear::TBL_YEAR_ID]) && $Year[ViewYear::TBL_YEAR_ID] != 0
                                                                ? new WarningMessage(new Container('Filterung findet keine Personen (ohne Account)')
                                                                . ($tblSchoolTypeList
                                                                    ? new Container('Folgende Schularten werden in den Einstellungen erlaubt: '.implode(', ', $tblSchoolTypeList))
                                                Severity: Major
                                                Found in Application/Setting/User/Account/Frontend.php and 1 other location - About 1 hr to fix
                                                Application/Setting/User/Account/Frontend.php on lines 584..591

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

                                                        $formResult = new Form(new FormGroup(new FormRow(new FormColumn(
                                                            (isset($Year[ViewYear::TBL_YEAR_ID]) && $Year[ViewYear::TBL_YEAR_ID] != 0
                                                                ? new WarningMessage(new Container('Filterung findet keine Personen (ohne Account)')
                                                                    .($tblSchoolTypeList
                                                                        ? new Container('Folgende Schularten werden in den Einstellungen erlaubt: '.implode(', ', $tblSchoolTypeList))
                                                Severity: Major
                                                Found in Application/Setting/User/Account/Frontend.php and 1 other location - About 1 hr to fix
                                                Application/Setting/User/Account/Frontend.php on lines 191..198

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

                                                                    new FormColumn(
                                                                        new Panel('Bildung', array(
                                                                            (new SelectBox('Year['.ViewYear::TBL_YEAR_ID.']', 'Schuljahr',
                                                                                array('{{ Name }} {{ Description }}' => Term::useService()->getYearAllSinceYears(1))))
                                                                                ->setRequired(),
                                                Severity: Major
                                                Found in Application/Setting/User/Account/Frontend.php and 2 other locations - About 1 hr to fix
                                                Application/Reporting/Standard/Person/Frontend.php on lines 1463..1471
                                                Application/Setting/User/Account/Frontend.php on lines 282..290

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

                                                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

                                                                    new FormColumn(
                                                                        new Panel('Bildung', array(
                                                                            (new SelectBox('Year['.ViewYear::TBL_YEAR_ID.']', 'Schuljahr',
                                                                                array('{{ Name }} {{ Description }}' => Term::useService()->getYearAllSinceYears(1))))
                                                                                ->setRequired(),
                                                Severity: Major
                                                Found in Application/Setting/User/Account/Frontend.php and 2 other locations - About 1 hr to fix
                                                Application/Reporting/Standard/Person/Frontend.php on lines 1463..1471
                                                Application/Setting/User/Account/Frontend.php on lines 671..679

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

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

                                                            if (isset($Division) && $Division) {
                                                                array_walk($Division, function (&$Input) {
                                                
                                                                    if (!empty($Input)) {
                                                                        $Input = explode(' ', $Input);
                                                Severity: Major
                                                Found in Application/Setting/User/Account/Frontend.php and 5 other locations - About 1 hr to fix
                                                Application/Api/MassReplace/StudentFilter.php on lines 251..264
                                                Application/Reporting/Standard/Person/Service.php on lines 2319..2333
                                                Application/Reporting/Standard/Person/Service.php on lines 2334..2348
                                                Application/Reporting/Standard/Person/Service.php on lines 2349..2363
                                                Application/Setting/User/Account/Frontend.php on lines 358..371

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

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

                                                            if (isset($Person) && $Person) {
                                                                array_walk($Person, function (&$Input) {
                                                
                                                                    if (!empty($Input)) {
                                                                        $Input = explode(' ', $Input);
                                                Severity: Major
                                                Found in Application/Setting/User/Account/Frontend.php and 5 other locations - About 1 hr to fix
                                                Application/Api/MassReplace/StudentFilter.php on lines 251..264
                                                Application/Reporting/Standard/Person/Service.php on lines 2319..2333
                                                Application/Reporting/Standard/Person/Service.php on lines 2334..2348
                                                Application/Reporting/Standard/Person/Service.php on lines 2349..2363
                                                Application/Setting/User/Account/Frontend.php on lines 373..386

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

                                                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

                                                                    new FormColumn(
                                                                        new Panel('Klasse', array(
                                                                            new SelectBox('Division['.ViewDivision::TBL_LEVEL_ID.']', 'Stufe',
                                                                                array('{{ Name }} {{ serviceTblType.Name }}' => $tblLevelShowList)),
                                                                            new AutoCompleter('Division['.ViewDivision::TBL_DIVISION_NAME.']', 'Gruppe',
                                                Severity: Major
                                                Found in Application/Setting/User/Account/Frontend.php and 2 other locations - About 1 hr to fix
                                                Application/Reporting/Standard/Person/Frontend.php on lines 1472..1479
                                                Application/Setting/User/Account/Frontend.php on lines 680..687

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

                                                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

                                                                    new FormColumn(
                                                                        new Panel('Klasse', array(
                                                                            new SelectBox('Division['.ViewDivision::TBL_LEVEL_ID.']', 'Stufe',
                                                                                array('{{ Name }} {{ serviceTblType.Name }}' => $tblLevelShowList)),
                                                                            new AutoCompleter('Division['.ViewDivision::TBL_DIVISION_NAME.']', 'Gruppe',
                                                Severity: Major
                                                Found in Application/Setting/User/Account/Frontend.php and 2 other locations - About 1 hr to fix
                                                Application/Reporting/Standard/Person/Frontend.php on lines 1472..1479
                                                Application/Setting/User/Account/Frontend.php on lines 291..298

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

                                                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 (!empty($TableContent)) {
                                                            $formResult = (new Form(
                                                                new FormGroup(
                                                                    new FormRow(array(
                                                                        new FormColumn($Table),
                                                Severity: Minor
                                                Found in Application/Setting/User/Account/Frontend.php and 1 other location - About 55 mins to fix
                                                Application/Setting/User/Account/Frontend.php on lines 199..212

                                                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

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

                                                        if (!empty($TableContent)) {
                                                            $formResult = (new Form(
                                                                new FormGroup(
                                                                    new FormRow(array(
                                                                        new FormColumn($Table),
                                                Severity: Minor
                                                Found in Application/Setting/User/Account/Frontend.php and 1 other location - About 55 mins to fix
                                                Application/Setting/User/Account/Frontend.php on lines 592..604

                                                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

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

                                                                $Stage->setContent(
                                                                    new Layout(new LayoutGroup(array(
                                                                        new LayoutRow(new LayoutColumn(array(
                                                                            ($IsDestroy
                                                                                ? new SuccessMessage(new SuccessIcon().' Der Benutzer wurde gelöscht')
                                                Severity: Minor
                                                Found in Application/Setting/User/Account/Frontend.php and 1 other location - About 50 mins to fix
                                                Application/Setting/User/Account/Frontend.php on lines 1484..1494

                                                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

                                                                $Stage->setContent(
                                                                    new Layout(new LayoutGroup(array(
                                                                        new LayoutRow(new LayoutColumn(array(
                                                                            ($IsChanged
                                                                                ? new SuccessMessage(new SuccessIcon().' Der Benutzer wurde Zurückgesetzt')
                                                Severity: Minor
                                                Found in Application/Setting/User/Account/Frontend.php and 1 other location - About 50 mins to fix
                                                Application/Setting/User/Account/Frontend.php on lines 1592..1602

                                                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

                                                There are no issues that match your filters.

                                                Category
                                                Status