DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Method formAddressToPerson has 107 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function formAddressToPerson($PersonId, $ToPersonId = null, $setPost = false, $showRelationships = false)
    {

        if (!($tblPerson = Person::useService()->getPersonById($PersonId))) {
            return new Danger('Die Person wurde nicht gefunden', new Exclamation());
Severity: Major
Found in Application/Contact/Address/Frontend.php - About 4 hrs to fix

    Method getBasicCourses has 107 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function getBasicCourses(TblPerson $tblPerson = null, $IsGradeUnderlined = true)
        {
    
            $slice = new Slice();
            $personId = $tblPerson ? $tblPerson->getId() : 0;

      Method setGradeLayoutBodyForSekII has 107 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function setGradeLayoutBodyForSekII(
              $subjectPosition = array(),
              $typeId = 0,
              $countSubjectColumns = 23,
              $countRows = 8,

        Method assign has 107 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function assign($genderSetting)
            {
                $unAssigned = array();
                $assignedCount = 0;
                $unAssignedCount = 0;
        Severity: Major
        Found in Application/People/Group/CustodySorter.php - About 4 hrs to fix

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

          <?php
          namespace SPHERE\Application\People\Group\Service;
          
          use SPHERE\Application\People\Group\Service\Entity\TblGroup;
          use SPHERE\Application\People\Group\Service\Entity\TblMember;
          Severity: Minor
          Found in Application/People/Group/Service/Data.php - About 4 hrs to fix

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

                public function frontendLayoutCombine(TblCompany $tblCompany)
                {
            
                    $tblAddressAllUnsorted = Address::useService()->getAddressAllByCompany($tblCompany);
            
            
            Severity: Minor
            Found in Application/Setting/Consumer/School/Frontend.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 getObligationToVotePartCustomForCoswig has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

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

            Cognitive Complexity

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

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

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

            Further reading

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

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

            Cognitive Complexity

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

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

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

            Further reading

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

                private function allocatePersonParents(&$Data)
                {
            
                    if ($this->getTblPerson()) {
                        if (($tblRelationshipList = Relationship::useService()->getPersonRelationshipAllByPerson($this->getTblPerson()))) {
            Severity: Minor
            Found in Application/Api/Document/AbstractDocument.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 addSerialCompanyBulk has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

                public function addSerialCompanyBulk(TblSerialLetter $tblSerialLetter, $tblCompanyList)
                {
                    $Manager = $this->getConnection()->getEntityManager();
            
                    foreach ($tblCompanyList as $CompanyId => $PersonIdList) {
            Severity: Minor
            Found in Application/Reporting/SerialLetter/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 fillColumnRowItemPriceList has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

                private function fillColumnRowItemPriceList(&$tableContent, TblPerson $tblPersonDebtor, $CauserId, $ItemContent)
                {
            
                    if(($tblPersonCauser = Person::useService()->getPersonById($CauserId))){
                        $item['Debtor'] = $tblPersonDebtor->getLastFirstName();
            Severity: Minor
            Found in Application/Billing/Bookkeeping/Balance/Service.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 getInvoiceByPersonCauserAndItemAndYearAndMonth has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getInvoiceByPersonCauserAndItemAndYearAndMonth(
                    TblPerson $tblPerson,
                    TblItem $tblItem,
                    $Year,
                    $Month
            Severity: Minor
            Found in Application/Billing/Bookkeeping/Invoice/Service.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 updateSpecial has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

                public function updateSpecial($PersonId, $SpecialId, $Data = array())
                {
            
                    $tblSpecial = Student::useService()->getSpecialById($SpecialId);
                    $tblPerson = Person::useService()->getPersonById($PersonId);
            Severity: Minor
            Found in Application/People/Meta/Student/Service/Service/Support.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 getCurrentDivisionListByPerson has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getCurrentDivisionListByPerson(TblPerson $tblPerson)
                {
            
                    $tblDivisionList = array();
                    if (Group::useService()->existsGroupPerson(Group::useService()->getGroupByMetaTable('STUDENT'),
            Severity: Minor
            Found in Application/People/Meta/Student/Service.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 getGradeTypesAll has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getGradeTypesAll($IsActive = true)
                {
            
                    $resultList = array();
                    $tblScoreConditionAllByRule = Gradebook::useService()->getScoreConditionsByRule($this);

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

                private function addTest(TblTest $tblTest,TblGrade $tblGrade = null, &$subTableHeaderList, &$subTableDataList, $hasScore, $showDivisionInToolTip)
                {
                    if ($tblTest->isContinues()) {
                        if ($tblGrade && $tblGrade->getDate()) {
                            $date = $tblGrade->getDate();
            Severity: Minor
            Found in Application/Education/Graduation/Gradebook/Frontend.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 getCertificateMultiContent has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getCertificateMultiContent(TblPrepareCertificate $tblPrepare, TblGroup $tblGroup = null)
                {
            
                    $Content = array();
            
            
            Severity: Minor
            Found in Application/Education/Certificate/Prepare/Service.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 setHeaderButtonList has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

                private function setHeaderButtonList(Stage $Stage, $view)
                {
                    $hasTeacherRight = Access::useService()->hasAuthorization('/Education/Certificate/Prepare/Teacher');
                    $hasHeadmasterRight = Access::useService()->hasAuthorization('/Education/Certificate/Prepare/Headmaster');
                    $hasDiplomaRight = Access::useService()->hasAuthorization('/Education/Certificate/Prepare/Diploma');
            Severity: Minor
            Found in Application/Education/Certificate/Prepare/Frontend.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 createAbsence has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

                public function createAbsence(
                    IFormInterface $Stage = null,
                    TblPerson $tblPerson,
                    TblDivision $tblDivision,
                    $BasicRoute = '',
            Severity: Minor
            Found in Application/Education/ClassRegister/Absence/Service.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 findDateTime has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

                private function findDateTime($Value)
                {
            
                    $PatternList = false;
                    $ResultList = array();
            Severity: Minor
            Found in System/Database/Filter/Link/AbstractNode.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

            Severity
            Category
            Status
            Source
            Language