DerDu/SPHERE-Framework

View on GitHub
Application/Education/Lesson/Division/Service/Data.php

Summary

Maintainability
F
2 wks
Test Coverage

File Data.php has 1537 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
namespace SPHERE\Application\Education\Lesson\Division\Service;

use SPHERE\Application\Education\Lesson\Division\Service\Entity\TblDivision;
use SPHERE\Application\Education\Lesson\Division\Service\Entity\TblDivisionCustody;
Severity: Major
Found in Application/Education/Lesson/Division/Service/Data.php - About 4 days to fix

    Data has 112 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Data extends AbstractData
    {
    
        /**
         * @return false|ViewDivision[]
    Severity: Major
    Found in Application/Education/Lesson/Division/Service/Data.php - About 2 days to fix

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

          public function getStudentByDivisionSubject(
              TblDivisionSubject $tblDivisionSubject,
              $withInActive = false
          ) {
      
      
      Severity: Minor
      Found in Application/Education/Lesson/Division/Service/Data.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 getStudentAllByDivision has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
      Open

          public function getStudentAllByDivision(TblDivision $tblDivision, $withInActive = false)
          {
      
              $TempList = $this->getCachedEntityListBy(__Method__, $this->getConnection()->getEntityManager(),
                  'TblDivisionStudent',
      Severity: Minor
      Found in Application/Education/Lesson/Division/Service/Data.php - About 3 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

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

          public function getDivisionSubjectListByDivision(TblDivision $tblDivision)
          {
      
              $EntityList = $this->getCachedEntityListBy(__Method__, $this->getConnection()->getEntityManager(),
                  'TblDivisionSubject',
      Severity: Minor
      Found in Application/Education/Lesson/Division/Service/Data.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 getStudentByDivisionSubject has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getStudentByDivisionSubject(
              TblDivisionSubject $tblDivisionSubject,
              $withInActive = false
          ) {
      
      
      Severity: Minor
      Found in Application/Education/Lesson/Division/Service/Data.php - About 1 hr to fix

        Method getStudentAllByDivision has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getStudentAllByDivision(TblDivision $tblDivision, $withInActive = false)
            {
        
                $TempList = $this->getCachedEntityListBy(__Method__, $this->getConnection()->getEntityManager(),
                    'TblDivisionStudent',
        Severity: Minor
        Found in Application/Education/Lesson/Division/Service/Data.php - About 1 hr to fix

          Function getSubjectAllByDivision has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
          Open

              public function getSubjectAllByDivision(TblDivision $tblDivision)
              {
          
                  $TempList = $this->getCachedEntityListBy(__Method__, $this->getConnection()->getEntityManager(),
                      'TblDivisionSubject',
          Severity: Minor
          Found in Application/Education/Lesson/Division/Service/Data.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 addDivisionSubject has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function addDivisionSubject(
                  TblDivision $tblDivision,
                  TblSubject $tblSubject,
                  TblSubjectGroup $tblSubjectGroup = null,
                  $HasGrading = true
          Severity: Minor
          Found in Application/Education/Lesson/Division/Service/Data.php - About 1 hr to fix

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

                public function getDivisionStudentAllByPerson(TblPerson $tblPerson, $isForced = false)
                {
            
                    if ($isForced) {
                        $EntityList = $this->getForceEntityListBy(__METHOD__, $this->getConnection()->getEntityManager(),
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.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

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

                public function countDivisionTeacherAllByDivision(TblDivision $tblDivision)
                {
            
                    // Todo GCK getCachedCountBy anpassen --> ignorieren von removed entities bei Verkn�pfungstabelle
            //        $result = $this->getCachedCountBy(__METHOD__, $this->getConnection()->getEntityManager(), 'TblDivisionTeacher',
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.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

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

                public function countDivisionSubjectAllByDivision(TblDivision $tblDivision)
                {
                    // Todo GCK getCachedCountBy anpassen --> ignorieren von removed entities bei Verkn�pfungstabelle
            //        $result = $this->getCachedCountBy(__METHOD__, $this->getConnection()->getEntityManager(), 'TblDivisionSubject',
            //            array(TblDivisionSubject::ATTR_TBL_DIVISION => $tblDivision->getId()));
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.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

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

                public function getDivisionStudentSortOrderMax(TblDivision $tblDivision)
                {
            
                    $list = $this->getDivisionStudentAllByDivision($tblDivision, true);
                    $max = 0;
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.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 getTeacherAllByDivision has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getTeacherAllByDivision(TblDivision $tblDivision)
                {
            
                    $TempList = $this->getCachedEntityListBy(__Method__, $this->getConnection()->getEntityManager(),
                        'TblDivisionTeacher',
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.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 getDivisionSubjectBySubjectAndDivision has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getDivisionSubjectBySubjectAndDivision(TblSubject $tblSubject, TblDivision $tblDivision)
                {
            
                    $EntityList = $this->getCachedEntityListBy(__Method__, $this->getConnection()->getEntityManager(),
                        'TblDivisionSubject',
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.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 getDivisionSubjectByDivision has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getDivisionSubjectByDivision(TblDivision $tblDivision)
                {
            
                    $EntityList = $this->getCachedEntityListBy(__Method__, $this->getConnection()->getEntityManager(),
                        'TblDivisionSubject',
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.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 countSubjectStudentByDivisionSubject has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function countSubjectStudentByDivisionSubject(
                    TblDivisionSubject $tblDivisionSubject
                ) {
            
                    // Todo GCK getCachedCountBy anpassen --> ignorieren von removed entities bei Verkn�pfungstabelle
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.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 countDivisionCustodyAllByDivision has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function countDivisionCustodyAllByDivision(TblDivision $tblDivision)
                {
                    // Todo GCK getCachedCountBy anpassen --> ignorieren von removed entities bei Verkn�pfungstabelle
            //        $result = $this->getCachedCountBy(__METHOD__, $this->getConnection()->getEntityManager(), 'TblDivisionCustody',
            //            array(TblDivisionCustody::ATTR_TBL_DIVISION => $tblDivision->getId()));
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.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 isDivisionSorted has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                private function isDivisionSorted(TblDivision $tblDivision)
                {
            
                    $TempList = $this->getCachedEntityListBy(__Method__, $this->getConnection()->getEntityManager(),
                        'TblDivisionStudent',
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php - About 25 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 getDivisionStudentAllByDivision has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getDivisionStudentAllByDivision(TblDivision $tblDivision, $withInActive = false)
                {
            
                    $tempList = array();
                    if (($tblStudentAll = $this->getStudentAllByDivision($tblDivision, $withInActive))) {
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php - About 25 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 addSubjectStudentList has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function addSubjectStudentList($SubjectStudentList)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
            
            
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php - About 25 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 removeAllSelectedStudentsFromSubjectGroup has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function removeAllSelectedStudentsFromSubjectGroup(TblDivisionSubject $tblDivisionSubject)
                {
                    $Manager = $this->getConnection()->getEntityManager();
            
                    if (($tblStudentSubjectList = $this->getSubjectStudentByDivisionSubject($tblDivisionSubject))) {
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php - About 25 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 removeSubjectGroupFilterByDivisionSubject has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function removeSubjectGroupFilterByDivisionSubject(TblDivisionSubject $tblDivisionSubject)
                {
            
                    if (($tblSubjectGroup =$tblDivisionSubject->getTblSubjectGroup())) {
                        $Manager = $this->getConnection()->getEntityManager();
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php - About 25 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 addSubjectTeacherList has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function addSubjectTeacherList($SubjectTeacherList)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
            
            
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php - About 25 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 removeSubjectTeacherList has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function removeSubjectTeacherList($tblSubjectTeacherList)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    if ($tblSubjectTeacherList) {
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php - About 25 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 copyTeacherAllByDivision has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function copyTeacherAllByDivision(TblDivision $tblDivision, TblDivision $tblDivisionCopy)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $EntityList = $this->getConnection()->getEntityManager()->getEntity('TblDivisionTeacher')->findBy(array(
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php - About 25 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 removeSubjectStudentBulk has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function removeSubjectStudentBulk(
                    $tblSubjectStudentList = array()
                ) {
                    $Manager = $this->getConnection()->getEntityManager();
                    if (!empty($tblSubjectStudentList)) {
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php - About 25 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 getTeacherAllByDivisionSubject has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getTeacherAllByDivisionSubject(TblDivisionSubject $tblDivisionSubject)
                {
            
                    $TempList = $this->getConnection()->getEntityManager()->getEntity('TblSubjectTeacher')->findBy(array(
                        TblSubjectTeacher::ATTR_TBL_DIVISION_SUBJECT => $tblDivisionSubject->getId()
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php - About 25 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 countDivisionSubjectGroupByDivision has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function countDivisionSubjectGroupByDivision(TblDivision $tblDivision)
                {
            
                    $EntityList = $this->getCachedEntityListBy(__METHOD__, $this->getConnection()->getEntityManager(),
                        'TblDivisionSubject',
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php - About 25 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 getDivisionTeacherAllByTeacher has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getDivisionTeacherAllByTeacher(TblPerson $tblPerson)
                {
            
                    $EntityList = $this->getCachedEntityListBy(__METHOD__, $this->getConnection()->getEntityManager(),
                        'TblDivisionTeacher',
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php - About 25 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 getCustodyAllByDivision has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getCustodyAllByDivision(TblDivision $tblDivision)
                {
            
                    $TempList = $this->getCachedEntityListBy(__Method__, $this->getConnection()->getEntityManager(),
                        'TblDivisionCustody',
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php - About 25 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 copyCustodyAllByDivision has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function copyCustodyAllByDivision(TblDivision $tblDivision, TblDivision $tblDivisionCopy)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $EntityList = $this->getConnection()->getEntityManager()->getEntity('TblDivisionCustody')->findBy(array(
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php - About 25 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 getDivisionSubjectAllWhereSubjectGroupByDivisionAndSubject has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getDivisionSubjectAllWhereSubjectGroupByDivisionAndSubject(
                    TblDivision $tblDivision,
                    TblSubject $tblSubject
                ) {
            
            
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php - About 25 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

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

                public function addSubjectTeacherList($SubjectTeacherList)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
            
            
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 5 hrs to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1182..1212

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

            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

                public function addSubjectStudentList($SubjectStudentList)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
            
            
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 5 hrs to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1145..1175

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

            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

                public function copyTeacherAllByDivision(TblDivision $tblDivision, TblDivision $tblDivisionCopy)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $EntityList = $this->getConnection()->getEntityManager()->getEntity('TblDivisionTeacher')->findBy(array(
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 4 hrs to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 882..905

            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

                public function copyCustodyAllByDivision(TblDivision $tblDivision, TblDivision $tblDivisionCopy)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $EntityList = $this->getConnection()->getEntityManager()->getEntity('TblDivisionCustody')->findBy(array(
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 4 hrs to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 821..844

            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

                public function addDivisionTeacher(TblDivision $tblDivision, TblPerson $tblPerson, $Description = null)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $Entity = $Manager->getEntity('TblDivisionTeacher')
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 4 hrs to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1025..1043

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

            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

                public function addDivisionCustody(TblDivision $tblDivision, TblPerson $tblPerson, $Description = null)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $Entity = $Manager->getEntity('TblDivisionCustody')
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 4 hrs to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 998..1016

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

            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

                public function removeStudentToDivision(TblDivision $tblDivision, TblPerson $tblPerson, $IsSoftRemove = false)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $Entity = $Manager->getEntity('TblDivisionStudent')
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 2 other locations - About 3 hrs to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1250..1270
            Application/Education/Lesson/Division/Service/Data.php on lines 1279..1299

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

            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

                public function removeTeacherToDivision(TblDivision $tblDivision, TblPerson $tblPerson, $IsSoftRemove = false)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $Entity = $Manager->getEntity('TblDivisionTeacher')
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 2 other locations - About 3 hrs to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1221..1241
            Application/Education/Lesson/Division/Service/Data.php on lines 1279..1299

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

            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

                public function removePersonToDivision(TblDivision $tblDivision, TblPerson $tblPerson, $IsSoftRemove = false)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $Entity = $Manager->getEntity('TblDivisionCustody')
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 2 other locations - About 3 hrs to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1221..1241
            Application/Education/Lesson/Division/Service/Data.php on lines 1250..1270

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

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

                public function addSubjectTeacher(TblDivisionSubject $tblDivisionSubject, TblPerson $tblPerson)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $Entity = $Manager->getEntity('TblSubjectTeacher')
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 22 other locations - About 3 hrs to fix
            Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 459..480
            Application/Billing/Inventory/Document/Service/Data.php on lines 166..184
            Application/Billing/Inventory/Item/Service/Data.php on lines 569..593
            Application/Corporation/Group/Service/Data.php on lines 286..303
            Application/Education/Certificate/Generator/Service/Data.php on lines 4382..4404
            Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 496..519
            Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 595..618
            Application/Education/Lesson/Division/Service/Data.php on lines 1095..1112
            Application/Education/Lesson/Subject/Service/Data.php on lines 221..238
            Application/Education/Lesson/Subject/Service/Data.php on lines 272..289
            Application/Education/Lesson/Term/Service/Data.php on lines 234..251
            Application/People/Group/Service/Data.php on lines 365..382
            Application/People/Meta/Student/Service/Data/Agreement.php on lines 182..205
            Application/People/Meta/Student/Service/Data/Integration.php on lines 321..344
            Application/People/Meta/Student/Service/Data/Liberation.php on lines 165..188
            Application/Platform/Gatekeeper/Authorization/Access/Service/Data.php on lines 285..302
            Application/Platform/Gatekeeper/Authorization/Access/Service/Data.php on lines 328..345
            Application/Platform/Gatekeeper/Authorization/Access/Service/Data.php on lines 371..388
            Application/Platform/Gatekeeper/Authorization/Account/Service/Data.php on lines 294..311
            Application/Platform/Gatekeeper/Authorization/Account/Service/Data.php on lines 319..336
            Application/Platform/Gatekeeper/Authorization/Account/Service/Data.php on lines 1132..1149
            Application/Reporting/SerialLetter/Service/Data.php on lines 472..493

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 148.

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

                public function addSubjectStudent(TblDivisionSubject $tblDivisionSubject, TblPerson $tblPerson)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $Entity = $Manager->getEntity('TblSubjectStudent')
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 22 other locations - About 3 hrs to fix
            Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 459..480
            Application/Billing/Inventory/Document/Service/Data.php on lines 166..184
            Application/Billing/Inventory/Item/Service/Data.php on lines 569..593
            Application/Corporation/Group/Service/Data.php on lines 286..303
            Application/Education/Certificate/Generator/Service/Data.php on lines 4382..4404
            Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 496..519
            Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 595..618
            Application/Education/Lesson/Division/Service/Data.php on lines 1120..1138
            Application/Education/Lesson/Subject/Service/Data.php on lines 221..238
            Application/Education/Lesson/Subject/Service/Data.php on lines 272..289
            Application/Education/Lesson/Term/Service/Data.php on lines 234..251
            Application/People/Group/Service/Data.php on lines 365..382
            Application/People/Meta/Student/Service/Data/Agreement.php on lines 182..205
            Application/People/Meta/Student/Service/Data/Integration.php on lines 321..344
            Application/People/Meta/Student/Service/Data/Liberation.php on lines 165..188
            Application/Platform/Gatekeeper/Authorization/Access/Service/Data.php on lines 285..302
            Application/Platform/Gatekeeper/Authorization/Access/Service/Data.php on lines 328..345
            Application/Platform/Gatekeeper/Authorization/Access/Service/Data.php on lines 371..388
            Application/Platform/Gatekeeper/Authorization/Account/Service/Data.php on lines 294..311
            Application/Platform/Gatekeeper/Authorization/Account/Service/Data.php on lines 319..336
            Application/Platform/Gatekeeper/Authorization/Account/Service/Data.php on lines 1132..1149
            Application/Reporting/SerialLetter/Service/Data.php on lines 472..493

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 148.

            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

                public function updateDivision(TblDivision $tblDivision, $Name, $Description = '')
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
            
            
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 2 hrs to fix
            Application/Education/Lesson/Subject/Service/Data.php on lines 327..345

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

            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

                    foreach ($personData as $tblPerson) {
                        $Entity = $Manager->getEntity('TblSubjectStudent')
                            ->findOneBy(array(
                                TblSubjectStudent::ATTR_SERVICE_TBL_PERSON   => $tblPerson->getId(),
                                TblSubjectStudent::ATTR_TBL_DIVISION_SUBJECT => $tblDivisionSubject->getId(),
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 2 other locations - About 2 hrs to fix
            Application/People/Group/Service/Data.php on lines 395..408
            Application/Reporting/SerialLetter/Service/Data.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 126.

            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

                public function removeSubjectStudent(TblSubjectStudent $tblSubjectStudent, $IsSoftRemove = false)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $Entity = $Manager->getEntityById('TblSubjectStudent', $tblSubjectStudent->getId());
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 2 hrs to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1447..1463

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 124.

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

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

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

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

            Refactorings

            Further Reading

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

                public function removeSubjectTeacher(TblSubjectTeacher $tblSubjectTeacher, $IsSoftRemove = false)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $Entity = $Manager->getEntityById('TblSubjectTeacher', $tblSubjectTeacher->getId());
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 2 hrs to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1351..1367

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 124.

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

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

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

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

            Refactorings

            Further Reading

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

                public function updateDivisionStudentSortOrder(TblDivisionStudent $tblDivisionStudent, $SortOrder)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
            
            
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 13 other locations - About 2 hrs to fix
            Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 639..656
            Application/Education/Certificate/Generate/Service/Data.php on lines 279..299
            Application/Education/Certificate/Prepare/Service/Data.php on lines 1642..1662
            Application/Education/Certificate/Prepare/Service/Data.php on lines 1729..1749
            Application/Education/Certificate/Prepare/Service/Data.php on lines 1799..1819
            Application/Education/Graduation/Gradebook/MinimumGradeCount/Data.php on lines 230..250
            Application/Education/Lesson/Division/Service/Data.php on lines 2298..2315
            Application/Reporting/CheckList/Service/Data.php on lines 69..84
            Application/Reporting/CheckList/Service/Data.php on lines 567..584
            Application/Reporting/CheckList/Service/Data.php on lines 696..713
            Application/Reporting/Individual/Service/Data.php on lines 219..238
            Application/Reporting/SerialLetter/Service/Data.php on lines 619..635
            Application/Setting/Consumer/Service/Data.php on lines 475..493

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 123.

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

                public function updateDivisionSubject(TblDivisionSubject $tblDivisionSubject, $HasGrading)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
            
            
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 13 other locations - About 2 hrs to fix
            Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 639..656
            Application/Education/Certificate/Generate/Service/Data.php on lines 279..299
            Application/Education/Certificate/Prepare/Service/Data.php on lines 1642..1662
            Application/Education/Certificate/Prepare/Service/Data.php on lines 1729..1749
            Application/Education/Certificate/Prepare/Service/Data.php on lines 1799..1819
            Application/Education/Graduation/Gradebook/MinimumGradeCount/Data.php on lines 230..250
            Application/Education/Lesson/Division/Service/Data.php on lines 2033..2050
            Application/Reporting/CheckList/Service/Data.php on lines 69..84
            Application/Reporting/CheckList/Service/Data.php on lines 567..584
            Application/Reporting/CheckList/Service/Data.php on lines 696..713
            Application/Reporting/Individual/Service/Data.php on lines 219..238
            Application/Reporting/SerialLetter/Service/Data.php on lines 619..635
            Application/Setting/Consumer/Service/Data.php on lines 475..493

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 123.

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

                public function restoreDivisionStudent(TblDivisionStudent $tblDivisionStudent)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    /** @var TblDivisionStudent $Entity */
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 14 other locations - About 2 hrs to fix
            Application/Contact/Address/Service/Data.php on lines 863..877
            Application/Contact/Mail/Service/Data.php on lines 304..318
            Application/Contact/Phone/Service/Data.php on lines 336..350
            Application/Education/ClassRegister/Absence/Service/Data.php on lines 223..237
            Application/People/Group/Service/Data.php on lines 541..555
            Application/People/Meta/Club/Service/Data.php on lines 149..163
            Application/People/Meta/Common/Service/Data.php on lines 366..380
            Application/People/Meta/Custody/Service/Data.php on lines 151..165
            Application/People/Meta/Prospect/Service/Data.php on lines 305..319
            Application/People/Meta/Student/Service/Data/Student.php on lines 470..484
            Application/People/Meta/Teacher/Service/Data.php on lines 199..213
            Application/People/Person/Service/Data.php on lines 205..220
            Application/People/Relationship/Service/Data.php on lines 648..662
            Application/People/Relationship/Service/Data.php on lines 669..683

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

            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

                public function removeSubjectStudentByDivisionSubject(TblDivisionSubject $tblDivisionSubject)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $EntityList = $Manager->getEntity('TblSubjectStudent')->findBy(
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 1 hr to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1423..1439

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

            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

                public function removeSubjectTeacherByDivisionSubject(TblDivisionSubject $tblDivisionSubject)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $EntityList = $Manager->getEntity('TblSubjectTeacher')->findBy(
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 1 hr to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1400..1416

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

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

                public function destroyLevel(TblLevel $tblLevel)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $Entity = $Manager->getEntity('TblLevel')->findOneBy(array('Id' => $tblLevel->getId()));
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 15 other locations - About 1 hr to fix
            Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 766..784
            Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 819..833
            Application/Billing/Inventory/Item/Service/Data.php on lines 681..699
            Application/Education/Certificate/Generator/Service/Data.php on lines 4453..4466
            Application/Education/Certificate/Generator/Service/Data.php on lines 4473..4486
            Application/Education/Certificate/Generator/Service/Data.php on lines 4631..4644
            Application/Education/Certificate/Generator/Service/Data.php on lines 4651..4664
            Application/Education/Lesson/Division/Service/Data.php on lines 1601..1614
            Application/Education/Lesson/Division/Service/Data.php on lines 2411..2426
            Application/Education/Lesson/Subject/Service/Data.php on lines 399..413
            Application/Education/Lesson/Subject/Service/Data.php on lines 420..434
            Application/Education/Lesson/Term/Service/Data.php on lines 191..205
            Application/Education/Lesson/Term/Service/Data.php on lines 212..226
            Application/Education/Lesson/Term/Service/Data.php on lines 871..886
            Application/Setting/Consumer/Service/Data.php on lines 556..569

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

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

                public function destroySubjectGroupFilter(TblSubjectGroupFilter $tblSubjectGroupFilter)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $Entity = $Manager->getEntity('TblSubjectGroupFilter')->findOneBy(array('Id' => $tblSubjectGroupFilter->getId()));
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 15 other locations - About 1 hr to fix
            Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 766..784
            Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 819..833
            Application/Billing/Inventory/Item/Service/Data.php on lines 681..699
            Application/Education/Certificate/Generator/Service/Data.php on lines 4453..4466
            Application/Education/Certificate/Generator/Service/Data.php on lines 4473..4486
            Application/Education/Certificate/Generator/Service/Data.php on lines 4631..4644
            Application/Education/Certificate/Generator/Service/Data.php on lines 4651..4664
            Application/Education/Lesson/Division/Service/Data.php on lines 1601..1614
            Application/Education/Lesson/Division/Service/Data.php on lines 1621..1634
            Application/Education/Lesson/Subject/Service/Data.php on lines 399..413
            Application/Education/Lesson/Subject/Service/Data.php on lines 420..434
            Application/Education/Lesson/Term/Service/Data.php on lines 191..205
            Application/Education/Lesson/Term/Service/Data.php on lines 212..226
            Application/Education/Lesson/Term/Service/Data.php on lines 871..886
            Application/Setting/Consumer/Service/Data.php on lines 556..569

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

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

                public function destroyDivision(TblDivision $tblDivision)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $Entity = $Manager->getEntity('TblDivision')->findOneBy(array('Id' => $tblDivision->getId()));
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 15 other locations - About 1 hr to fix
            Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 766..784
            Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 819..833
            Application/Billing/Inventory/Item/Service/Data.php on lines 681..699
            Application/Education/Certificate/Generator/Service/Data.php on lines 4453..4466
            Application/Education/Certificate/Generator/Service/Data.php on lines 4473..4486
            Application/Education/Certificate/Generator/Service/Data.php on lines 4631..4644
            Application/Education/Certificate/Generator/Service/Data.php on lines 4651..4664
            Application/Education/Lesson/Division/Service/Data.php on lines 1621..1634
            Application/Education/Lesson/Division/Service/Data.php on lines 2411..2426
            Application/Education/Lesson/Subject/Service/Data.php on lines 399..413
            Application/Education/Lesson/Subject/Service/Data.php on lines 420..434
            Application/Education/Lesson/Term/Service/Data.php on lines 191..205
            Application/Education/Lesson/Term/Service/Data.php on lines 212..226
            Application/Education/Lesson/Term/Service/Data.php on lines 871..886
            Application/Setting/Consumer/Service/Data.php on lines 556..569

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

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

                public function destroySubjectGroup(TblSubjectGroup $tblSubjectGroup)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $Entity = $Manager->getEntityById('TblSubjectGroup', $tblSubjectGroup->getId());
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 56 other locations - About 55 mins to fix
            Application/Billing/Accounting/Creditor/Service/Data.php on lines 136..149
            Application/Billing/Accounting/Debtor/Service/Data.php on lines 665..678
            Application/Billing/Accounting/Debtor/Service/Data.php on lines 685..698
            Application/Billing/Accounting/Debtor/Service/Data.php on lines 705..718
            Application/Billing/Accounting/Debtor/Service/Data.php on lines 725..738
            Application/Billing/Inventory/Document/Service/Data.php on lines 216..230
            Application/Billing/Inventory/Item/Service/Data.php on lines 600..614
            Application/Billing/Inventory/Item/Service/Data.php on lines 621..634
            Application/Billing/Inventory/Item/Service/Data.php on lines 641..654
            Application/Billing/Inventory/Item/Service/Data.php on lines 661..674
            Application/Contact/Address/Service/Data.php on lines 789..801
            Application/Contact/Mail/Service/Data.php on lines 255..267
            Application/Contact/Phone/Service/Data.php on lines 257..269
            Application/Contact/Web/Service/Data.php on lines 223..235
            Application/Corporation/Company/Service/Data.php on lines 230..243
            Application/Corporation/Group/Service/Data.php on lines 334..346
            Application/Corporation/Group/Service/Data.php on lines 353..365
            Application/Corporation/Group/Service/Data.php on lines 372..384
            Application/Education/Certificate/Generator/Service/Data.php on lines 3924..3936
            Application/Education/Graduation/Gradebook/MinimumGradeCount/Data.php on lines 257..270
            Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 659..671
            Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 678..690
            Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 697..709
            Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 716..728
            Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 735..747
            Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 1097..1112
            Application/Education/Graduation/Gradebook/Service/Data.php on lines 230..243
            Application/Education/Graduation/Gradebook/Service/Data.php on lines 618..631
            Application/Education/Lesson/Term/Service/Data.php on lines 893..908
            Application/People/Group/Service/Data.php on lines 452..464
            Application/People/Group/Service/Data.php on lines 471..483
            Application/People/Meta/Student/Service/Data/Agreement.php on lines 212..224
            Application/People/Meta/Student/Service/Data/Integration.php on lines 351..363
            Application/People/Meta/Student/Service/Data/Integration.php on lines 409..421
            Application/People/Meta/Student/Service/Data/Liberation.php on lines 195..207
            Application/People/Meta/Student/Service/Data/Student.php on lines 404..416
            Application/People/Meta/Student/Service/Data/Subject.php on lines 240..254
            Application/People/Meta/Student/Service/Data/Support.php on lines 694..706
            Application/People/Meta/Student/Service/Data/Support.php on lines 713..725
            Application/People/Meta/Student/Service/Data/Support.php on lines 732..744
            Application/People/Meta/Student/Service/Data/Support.php on lines 751..763
            Application/People/Meta/Student/Service/Data/Support.php on lines 770..782
            Application/Platform/Gatekeeper/Authorization/Account/Service/Data.php on lines 158..170
            Application/Platform/Gatekeeper/Authorization/Account/Service/Data.php on lines 463..475
            Application/Platform/Gatekeeper/Authorization/Account/Service/Data.php on lines 697..709
            Application/Platform/System/Test/Service/Data.php on lines 65..80
            Application/Reporting/CheckList/Service/Data.php on lines 676..688
            Application/Reporting/Individual/Service/Data.php on lines 341..353
            Application/Reporting/Individual/Service/Data.php on lines 360..372
            Application/Reporting/Individual/Service/Data.php on lines 379..391
            Application/Reporting/SerialLetter/Service/Data.php on lines 887..900
            Application/Reporting/SerialLetter/Service/Data.php on lines 907..920
            Application/Setting/Consumer/Responsibility/Service/Data.php on lines 113..127
            Application/Setting/Consumer/School/Service/Data.php on lines 142..156
            Application/Setting/Consumer/SponsorAssociation/Service/Data.php on lines 72..86
            Application/Setting/User/Account/Service/Data.php on lines 277..289

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

                public function removeDivisionSubject(TblDivisionSubject $tblDivisionSubject)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $Entity = $Manager->getEntityById('TblDivisionSubject', $tblDivisionSubject->getId());
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 2 other locations - About 55 mins to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1495..1507
            Application/Platform/Gatekeeper/Authorization/Token/Service/Data.php on lines 101..112

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

                public function removeSubjectGroup(TblSubjectGroup $tblSubjectGroup)
                {
            
                    $Manager = $this->getConnection()->getEntityManager();
                    $Entity = $Manager->getEntityById('TblSubjectGroup', $tblSubjectGroup->getId());
            Severity: Major
            Found in Application/Education/Lesson/Division/Service/Data.php and 2 other locations - About 55 mins to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1331..1343
            Application/Platform/Gatekeeper/Authorization/Token/Service/Data.php on lines 101..112

            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

                public function countDivisionTeacherAllByDivision(TblDivision $tblDivision)
                {
            
                    // Todo GCK getCachedCountBy anpassen --> ignorieren von removed entities bei Verkn�pfungstabelle
            //        $result = $this->getCachedCountBy(__METHOD__, $this->getConnection()->getEntityManager(), 'TblDivisionTeacher',
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 55 mins to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1777..1803

            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

                public function countDivisionSubjectAllByDivision(TblDivision $tblDivision)
                {
                    // Todo GCK getCachedCountBy anpassen --> ignorieren von removed entities bei Verkn�pfungstabelle
            //        $result = $this->getCachedCountBy(__METHOD__, $this->getConnection()->getEntityManager(), 'TblDivisionSubject',
            //            array(TblDivisionSubject::ATTR_TBL_DIVISION => $tblDivision->getId()));
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 55 mins to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1710..1737

            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($tblSubjectStudentList)) {
                        foreach ($tblSubjectStudentList as $tblSubjectStudent) {
                            $Entity = $Manager->getEntityById('TblSubjectStudent', $tblSubjectStudent->getId());
                            if (null !== $Entity) {
                                /** @var TblSubjectStudent $Entity */
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 50 mins to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1474..1486

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 97.

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

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

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

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

            Refactorings

            Further Reading

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

                    if ($tblSubjectTeacherList) {
                        foreach ($tblSubjectTeacherList as $tblSubjectTeacher) {
                            $Entity = $Manager->getEntityById('TblSubjectTeacher', $tblSubjectTeacher->getId());
                            if (null !== $Entity) {
                                /** @var TblSubjectTeacher $Entity */
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 50 mins to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1378..1391

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 97.

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

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

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

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

            Refactorings

            Further Reading

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

                    if (null === $Entity) {
                        $Entity = new TblDivision();
                        $Entity->setServiceTblYear($tblYear);
                        $Entity->setTblLevel($tblLevel);
                        $Entity->setName($Name);
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 40 mins to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 112..122

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

            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 (null === $Entity) {
                        $Entity = new TblLevel();
                        $Entity->setServiceTblType($tblType);
                        $Entity->setName($Name);
                        $Entity->setDescription($Description);
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 40 mins to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 145..154

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

            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 (null === $Entity) {
                        $Entity = new TblDivisionStudent();
                        $Entity->setTblDivision($tblDivision);
                        $Entity->setServiceTblPerson($tblPerson);
                        $Entity->setSortOrder($SortOrder);
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php and 1 other location - About 40 mins to fix
            Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 439..448

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

            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

                public function countSubjectStudentByDivisionSubject(
                    TblDivisionSubject $tblDivisionSubject
                ) {
            
                    // Todo GCK getCachedCountBy anpassen --> ignorieren von removed entities bei Verkn�pfungstabelle
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php and 2 other locations - About 30 mins to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1744..1770
            Application/Reporting/CheckList/Service/Data.php on lines 474..500

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

            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

                public function countDivisionCustodyAllByDivision(TblDivision $tblDivision)
                {
                    // Todo GCK getCachedCountBy anpassen --> ignorieren von removed entities bei Verkn�pfungstabelle
            //        $result = $this->getCachedCountBy(__METHOD__, $this->getConnection()->getEntityManager(), 'TblDivisionCustody',
            //            array(TblDivisionCustody::ATTR_TBL_DIVISION => $tblDivision->getId()));
            Severity: Minor
            Found in Application/Education/Lesson/Division/Service/Data.php and 2 other locations - About 30 mins to fix
            Application/Education/Lesson/Division/Service/Data.php on lines 1960..1991
            Application/Reporting/CheckList/Service/Data.php on lines 474..500

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

            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