DerDu/SPHERE-Framework

View on GitHub
Application/Reporting/SerialLetter/SerialLetterFilter.php

Summary

Maintainability
F
1 wk
Test Coverage

File SerialLetterFilter.php has 607 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
namespace SPHERE\Application\Reporting\SerialLetter;


use SPHERE\Application\Contact\Address\Address;
Severity: Major
Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 1 day to fix

    Function getCompanyTableByResult has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getCompanyTableByResult($Result)
        {
    
            $TableSearch = array();
            if (!empty($Result)) {
    Severity: Minor
    Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 6 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function getProspectTableByResult has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getProspectTableByResult($Result)
        {
    
            $TableSearch = array();
            if (!empty($Result)) {
    Severity: Minor
    Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 6 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function getStudentTableByResult has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getStudentTableByResult($Result)
        {
            $TableSearch = array();
            if (!empty($Result)) {
                /** @var AbstractView[]|ViewDivisionStudent[] $Row */
    Severity: Minor
    Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 4 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function getStudentFilterResultListBySerialLetter has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getStudentFilterResultListBySerialLetter(
            TblSerialLetter $tblSerialLetter = null,
            $FilterGroupList = array(),
            $FilterStudentList = array(),
            $FilterYearList = array(),
    Severity: Minor
    Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 4 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function getProspectFilterResultListBySerialLetter has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getProspectFilterResultListBySerialLetter(
            TblSerialLetter $tblSerialLetter = null,
            $FilterGroupList = array(),
            $FilterProspectList = array(),
            &$IsTimeout = false
    Severity: Minor
    Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 4 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

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

        public function getCompanyFilterResultListBySerialLetter(
            TblSerialLetter $tblSerialLetter = null,
            $FilterGroupList = array(),
            $FilterCompanyList = array(),
            $FilterRelationshipList = array(),
    Severity: Minor
    Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 4 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function getPersonListByResult has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getPersonListByResult(TblSerialLetter $tblSerialLetter = null, $Result = array())
        {
            $tblCategory = false;
            if ($tblSerialLetter !== null) {
                $tblCategory = $tblSerialLetter->getFilterCategory();
    Severity: Minor
    Found in Application/Reporting/SerialLetter/SerialLetterFilter.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 getStudentFilterResultListBySerialLetter has 93 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getStudentFilterResultListBySerialLetter(
            TblSerialLetter $tblSerialLetter = null,
            $FilterGroupList = array(),
            $FilterStudentList = array(),
            $FilterYearList = array(),
    Severity: Major
    Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 3 hrs to fix

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

          public function getCompanyFilterResultListBySerialLetter(
              TblSerialLetter $tblSerialLetter = null,
              $FilterGroupList = array(),
              $FilterCompanyList = array(),
              $FilterRelationshipList = array(),
      Severity: Major
      Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 3 hrs to fix

        Method getProspectFilterResultListBySerialLetter has 75 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getProspectFilterResultListBySerialLetter(
                TblSerialLetter $tblSerialLetter = null,
                $FilterGroupList = array(),
                $FilterProspectList = array(),
                &$IsTimeout = false
        Severity: Major
        Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 3 hrs to fix

          Function getGroupTableByResult has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
          Open

              public function getGroupTableByResult($Result)
              {
                  $TableSearch = array();
                  if (!empty($Result)) {
                      /** @var AbstractView[]|ViewPerson[] $Row */
          Severity: Minor
          Found in Application/Reporting/SerialLetter/SerialLetterFilter.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 getProspectTableByResult has 53 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getProspectTableByResult($Result)
              {
          
                  $TableSearch = array();
                  if (!empty($Result)) {
          Severity: Major
          Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 2 hrs to fix

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

                public function getCompanyTableByResult($Result)
                {
            
                    $TableSearch = array();
                    if (!empty($Result)) {
            Severity: Minor
            Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 2 hrs to fix

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

                  public function getGroupFilterResultListBySerialLetter(
                      TblSerialLetter $tblSerialLetter = null,
                      $FilterGroupList = array(),
                      &$IsTimeout = false
                  ) {
              Severity: Minor
              Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 1 hr to fix

                Function getGroupFilterResultListBySerialLetter has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function getGroupFilterResultListBySerialLetter(
                        TblSerialLetter $tblSerialLetter = null,
                        $FilterGroupList = array(),
                        &$IsTimeout = false
                    ) {
                Severity: Minor
                Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 1 hr 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 getStudentTableByResult has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getStudentTableByResult($Result)
                    {
                        $TableSearch = array();
                        if (!empty($Result)) {
                            /** @var AbstractView[]|ViewDivisionStudent[] $Row */
                Severity: Minor
                Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 1 hr to fix

                  Function getCompanyListByResult has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getCompanyListByResult($Result)
                      {
                  
                          $DataList = array();
                          $PersonList = array();
                  Severity: Minor
                  Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 1 hr 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 getPersonListByResult has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getPersonListByResult(TblSerialLetter $tblSerialLetter = null, $Result = array())
                      {
                          $tblCategory = false;
                          if ($tblSerialLetter !== null) {
                              $tblCategory = $tblSerialLetter->getFilterCategory();
                  Severity: Minor
                  Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 1 hr to fix

                    Method getGroupTableByResult has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getGroupTableByResult($Result)
                        {
                            $TableSearch = array();
                            if (!empty($Result)) {
                                /** @var AbstractView[]|ViewPerson[] $Row */
                    Severity: Minor
                    Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 1 hr to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                  if ($tblProspectReservation->getServiceTblTypeOptionB()) {
                                                      $DataPerson['ReservationOptionB'] = $tblProspectReservation->getServiceTblTypeOptionB()->getName();
                                                  }
                      Severity: Major
                      Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                        if ($tblRelationship->getTblType()) {
                                                            $Data['Type'] = $tblRelationship->getTblType()->getName();
                                                        }
                        Severity: Major
                        Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                      if ($tblProspectReservation->getServiceTblTypeOptionA()) {
                                                          $DataPerson['ReservationOptionA'] = $tblProspectReservation->getServiceTblTypeOptionA()->getName();
                                                      }
                          Severity: Major
                          Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 45 mins to fix

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

                                    TblSerialLetter $tblSerialLetter = null,
                                    $FilterGroupList = array(),
                                    $FilterCompanyList = array(),
                                    $FilterRelationshipList = array(),
                                    &$IsTimeout = false
                            Severity: Minor
                            Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 35 mins to fix

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

                                      TblSerialLetter $tblSerialLetter = null,
                                      $FilterGroupList = array(),
                                      $FilterStudentList = array(),
                                      $FilterYearList = array(),
                                      &$IsTimeout = false
                              Severity: Minor
                              Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 35 mins to fix

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

                                                if (isset($FilterYearList[$FilterNumber])) {
                                                    array_walk($FilterYearList[$FilterNumber], function (&$Input) {
                                                        if (!is_array($Input)) {
                                                            if (!empty($Input)) {
                                                                $Input = explode(' ', $Input);
                                Severity: Major
                                Found in Application/Reporting/SerialLetter/SerialLetterFilter.php and 4 other locations - About 2 hrs to fix
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 228..242
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 412..426
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 670..684
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 686..700

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

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

                                                if (isset($FilterStudentList[$FilterNumber])) {
                                                    array_walk($FilterStudentList[$FilterNumber], function (&$Input) {
                                                        if (!is_array($Input)) {
                                                            if (!empty($Input)) {
                                                                $Input = explode(' ', $Input);
                                Severity: Major
                                Found in Application/Reporting/SerialLetter/SerialLetterFilter.php and 4 other locations - About 2 hrs to fix
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 244..258
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 412..426
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 670..684
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 686..700

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

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

                                                if (isset($FilterRelationshipList[$FilterNumber])) {
                                                    array_walk($FilterRelationshipList[$FilterNumber], function (&$Input) {
                                                        if (!is_array($Input)) {
                                                            if (!empty($Input)) {
                                                                $Input = explode(' ', $Input);
                                Severity: Major
                                Found in Application/Reporting/SerialLetter/SerialLetterFilter.php and 4 other locations - About 2 hrs to fix
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 228..242
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 244..258
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 412..426
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 670..684

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

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

                                                    if (isset($FilterProspectList[$FilterNumber])) {
                                                        array_walk($FilterProspectList[$FilterNumber], function (&$Input) {
                                                            if (!is_array($Input)) {
                                                                if (!empty($Input)) {
                                                                    $Input = explode(' ', $Input);
                                Severity: Major
                                Found in Application/Reporting/SerialLetter/SerialLetterFilter.php and 4 other locations - About 2 hrs to fix
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 228..242
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 244..258
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 670..684
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 686..700

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

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

                                                if (isset($FilterCompanyList[$FilterNumber])) {
                                                    array_walk($FilterCompanyList[$FilterNumber], function (&$Input) {
                                                        if (!is_array($Input)) {
                                                            if (!empty($Input)) {
                                                                $Input = explode(' ', $Input);
                                Severity: Major
                                Found in Application/Reporting/SerialLetter/SerialLetterFilter.php and 4 other locations - About 2 hrs to fix
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 228..242
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 244..258
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 412..426
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 686..700

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

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

                                                if ($FilterGroup) {
                                                    // Preparation FilterGroup
                                                    array_walk($FilterGroup, function (&$Input) {
                                
                                                        if (!is_array($Input)) {
                                Severity: Major
                                Found in Application/Reporting/SerialLetter/SerialLetterFilter.php and 6 other locations - About 1 hr to fix
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 205..221
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 391..407
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 652..668
                                Application/Setting/User/Account/Service.php on lines 383..399
                                Application/Setting/User/Account/Service.php on lines 486..502
                                Application/Setting/User/Account/Service.php on lines 504..519

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

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

                                                    if ($FilterGroup) {
                                                        // Preparation FilterGroup
                                                        array_walk($FilterGroup, function (&$Input) {
                                
                                                            if (!is_array($Input)) {
                                Severity: Major
                                Found in Application/Reporting/SerialLetter/SerialLetterFilter.php and 6 other locations - About 1 hr to fix
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 71..87
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 205..221
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 652..668
                                Application/Setting/User/Account/Service.php on lines 383..399
                                Application/Setting/User/Account/Service.php on lines 486..502
                                Application/Setting/User/Account/Service.php on lines 504..519

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

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

                                                if ($FilterGroup) {
                                                    // Preparation FilterGroup
                                                    array_walk($FilterGroup, function (&$Input) {
                                
                                                        if (!is_array($Input)) {
                                Severity: Major
                                Found in Application/Reporting/SerialLetter/SerialLetterFilter.php and 6 other locations - About 1 hr to fix
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 71..87
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 205..221
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 391..407
                                Application/Setting/User/Account/Service.php on lines 383..399
                                Application/Setting/User/Account/Service.php on lines 486..502
                                Application/Setting/User/Account/Service.php on lines 504..519

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

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

                                                if ($FilterGroup) {
                                                    // Preparation FilterGroup
                                                    array_walk($FilterGroup, function (&$Input) {
                                
                                                        if (!is_array($Input)) {
                                Severity: Major
                                Found in Application/Reporting/SerialLetter/SerialLetterFilter.php and 6 other locations - About 1 hr to fix
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 71..87
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 391..407
                                Application/Reporting/SerialLetter/SerialLetterFilter.php on lines 652..668
                                Application/Setting/User/Account/Service.php on lines 383..399
                                Application/Setting/User/Account/Service.php on lines 486..502
                                Application/Setting/User/Account/Service.php on lines 504..519

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

                                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