DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function getGradeLanesCustomForChemnitz has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    protected function getGradeLanesCustomForChemnitz(
        $personId,
        $TextSize = '14px',
        $IsGradeUnderlined = false,
        $MarginTop = '15px'
Severity: Minor
Found in Application/Api/Education/Certificate/Generator/Certificate.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 formSubjectCourse has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public function formSubjectCourse(TblIndiwareImportStudent $tblIndiwareImportStudent, TblYear $tblYear = null)
    {

        $FormSubjectAll = array();
        $tblSubjectList = Subject::useService()->getSubjectAll();
Severity: Minor
Found in Application/Transfer/Indiware/Import/StudentCourse.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 frontendSaveRelationshipCustody has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendSaveRelationshipCustody()
    {
        $stage = new Stage('Einordnung der Sorgeberechtigten', 'nach S1, S2, S3');
        $stage->addButton(new Standard('Zurück', '/People/Group', new ChevronLeft()));

Severity: Minor
Found in Application/People/Group/Frontend.php - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Function getTestListForPlanning has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public function getTestListForPlanning($tblDivisionList, TblGradeType $tblGradeType = null, $isHighlighted = false)
    {

        $result = array();
        $tblGradeTypeList = array();
Severity: Minor
Found in Application/Education/Graduation/Evaluation/Service.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 getMinimumGradeCountAllByDivisionSubject has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public function getMinimumGradeCountAllByDivisionSubject(
        TblDivisionSubject $tblDivisionSubject,
        $isSekII
    ) {

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

    public function getContent($GroupId = null, $Data = null)
    {

        $dataList = array();
        if (($tblPrepareAdditionalGradeList = Prepare::useService()->getPrepareAdditionalGradeListBy(
Severity: Minor
Found in Application/Education/Certificate/Prepare/Abitur/BlockII.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 frontendDiplomaSelectDivision has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendDiplomaSelectDivision($IsAllYears = false, $IsGroup = false, $YearId = null)
    {

        $Stage = new Stage('Zeugnisvorbereitung', 'Klasse auswählen');
        $this->setHeaderButtonList($Stage, View::DIPLOMA);
Severity: Minor
Found in Application/Education/Certificate/Prepare/Frontend.php - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Function frontendShowTemplate has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendShowTemplate($PrepareId = null, $PersonId = null, $Route = 'Teacher')
    {

        $Stage = new Stage('Noteninformation', 'Vorschau und Herunterladen');
        $Stage->addButton(new Standard(
Severity: Minor
Found in Application/Education/Certificate/GradeInformation/Frontend.php - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Function frontendSubjectAdd has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendSubjectAdd($Id = null, $IsHasGradingView = false, $Data = null)
    {

        $tblDivision = $Id === null ? false : Division::useService()->getDivisionById($Id);
        if (!$tblDivision) {
Severity: Minor
Found in Application/Education/Lesson/Division/Frontend.php - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Function createLogic has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public function createLogic($Search, $Restriction, $ProbeIndex)
    {

        // ONLY Valid Id-Lists, NOT! Empty Lists
        $Restriction = array_filter( $Restriction );
Severity: Minor
Found in System/Database/Filter/Link/AbstractNode.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 getPrepareStudentListForStudentCard has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public function getPrepareStudentListForStudentCard(TblPerson $tblPerson, TblType $tblType = null)
    {

        $list = array();
        if (($tblDivisionStudentList = Division::useService()->getDivisionStudentAllByPerson($tblPerson))) {
Severity: Minor
Found in Application/Document/Generator/Service.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 getStudentCardSubjectListForSekIIByPerson has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public function getStudentCardSubjectListForSekIIByPerson(TblPerson $tblPerson)
    {

        $resultList = array();
        $list = array();
Severity: Minor
Found in Application/Document/Generator/Service.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 setForeignLanguages has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    private static function setForeignLanguages(
        &$Content,
        $countForeignSubjectArray,
        $countSecondForeignSubjectArray,
        TblType $tblSchoolType
Severity: Minor
Found in Application/Document/Generator/Service/Kamenz/KamenzReportService.php - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Method generatePdfControl has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function generatePdfControl(IFormInterface $Form, TblUserAccount $tblUserAccount, $Data = null, $Path = '/Setting/User')
    {

        if($Data === null){
            return $Form;
Severity: Major
Found in Application/Setting/User/Account/Service.php - About 3 hrs to fix

    Method openOverViewModal has 89 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function openOverViewModal($PersonId)
        {
    
            $tblPerson = Person::useService()->getPersonById($PersonId);
            if(!$tblPerson){
    Severity: Major
    Found in Application/Api/People/Meta/Agreement/ApiAgreementReadOnly.php - About 3 hrs to fix

      File ItemVariant.php has 315 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      namespace SPHERE\Application\Api\Billing\Inventory;
      
      use SPHERE\Application\Billing\Inventory\Item\Item;
      use SPHERE\Common\Frontend\Ajax\Emitter\ServerEmitter;
      Severity: Minor
      Found in Application/Api/Billing/Inventory/ItemVariant.php - About 3 hrs to fix

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

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

          Method createExtendedClassListExcel has 89 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function createExtendedClassListExcel($PersonList, $tblPersonList)
              {
          
                  if (!empty($PersonList)) {
          
          
          Severity: Major
          Found in Application/Reporting/Standard/Person/Service.php - About 3 hrs to fix

            Method formFilterProspect has 89 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function formFilterProspect(TblSerialLetter $tblSerialLetter = null)
                {
            
                    $GroupList = array();
                    $tblGroup = Group::useService()->getGroupByMetaTable('PROSPECT');
            Severity: Major
            Found in Application/Reporting/SerialLetter/SerialLetterForm.php - About 3 hrs to fix

              Method getItemContent has 89 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getItemContent($PersonId = '', $ItemId = '', $IsOpen = false)
                  {
              
                      $PanelContent = array();
                      $Accordion = '';
              Severity: Major
              Found in Application/Billing/Accounting/Causer/Frontend.php - About 3 hrs to fix
                Severity
                Category
                Status
                Source
                Language