DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function createStandardFilter has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
Open

    public function createStandardFilter(IFormInterface $Form, TblAccount $tblAccount, $Data = null, $Reset = null)
    {

        if ($Data === null && $Reset === null) {
            return $Form;
Severity: Minor
Found in Application/Reporting/Dynamic/Service.php - About 1 day to fix

Cognitive Complexity

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

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

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

Further reading

Function getDestroyDetailList has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
Open

    public function getDestroyDetailList(TblPerson $tblPerson)
    {

        $list[] = new Bold('Person: ' . $tblPerson->getLastFirstName());
        // Group
Severity: Minor
Found in Application/People/Person/Service.php - About 1 day to fix

Cognitive Complexity

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

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

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

Further reading

Function setContentForBehaviorTask has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
Open

    private function setContentForBehaviorTask(
        TblTest $tblTest,
        TblTask $tblTask = null,
        TblDivision $tblDivision,
        TblSubject $tblSubject,
Severity: Minor
Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 day to fix

Cognitive Complexity

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

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

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

Further reading

Function frontendPrepareDiplomaAbiturPreview has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendPrepareDiplomaAbiturPreview($PrepareId = null, $GroupId = null)
    {

        $stage = new Stage('Zeugnisvorbereitungen', 'Übersicht');

Severity: Minor
Found in Application/Education/Certificate/Prepare/Abitur/Frontend.php - About 1 day to fix

Cognitive Complexity

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

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

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

Further reading

Function flushCache has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
Open

    final public function flushCache($Region = null)
    {

        /** @var MemcachedHandler $Cache */
        $Cache = $this->getCache(new MemcachedHandler());
Severity: Minor
Found in System/Database/Fitting/Manager.php - About 1 day to fix

Cognitive Complexity

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

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

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

Further reading

File SignOutCertificate.php has 517 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace SPHERE\Application\Api\Document\Standard\Repository\SignOutCertificate;

use SPHERE\Application\Api\Document\AbstractDocument;

    Method frontendStudentCourseShow has 209 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function frontendStudentCourseShow($Visible = false)
        {
            $Stage = new Stage('Schüler-Kurse SEK II ', 'Übersicht');
            $Stage->addButton(new Standard('Zurück', '/Transfer/Indiware/Import', new ChevronLeft()));
            $tblIndiwareImportStudentList = Import::useService()->getIndiwareImportStudentAll(true);
    Severity: Major
    Found in Application/Transfer/Indiware/Import/StudentCourse.php - About 1 day to fix

      File Service.php has 514 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      namespace SPHERE\Application\Transfer\Import\Meerane;
      
      use MOC\V\Component\Document\Component\Bridge\Repository\PhpExcel;
      use MOC\V\Component\Document\Document;
      Severity: Major
      Found in Application/Transfer/Import/Meerane/Service.php - About 1 day to fix

        Method createInterestedPersonList has 208 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function createInterestedPersonList()
            {
        
                $tblPersonList = Group::useService()->getPersonAllByGroup(Group::useService()->getGroupByMetaTable('PROSPECT'));
                $TableContent = array();
        Severity: Major
        Found in Application/Reporting/Standard/Person/Service.php - About 1 day to fix

          Method createStaffFromFile has 208 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function createStaffFromFile(IFormInterface $Form = null, UploadedFile $File = null)
              {
          
                  /**
                   * Skip to Frontend
          Severity: Major
          Found in Application/Transfer/Import/Tharandt/Service.php - About 1 day to fix

            Method getRestoreDetailList has 207 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getRestoreDetailList(TblPerson $tblPerson, $isRestore)
                {
            
                    $count = 1;
                    $result[] = array(
            Severity: Major
            Found in Application/People/Person/Service.php - About 1 day to fix

              Function calcSubjectGradesAverage has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
              Open

                  private function calcSubjectGradesAverage(TblPrepareStudent $tblPrepareStudent)
                  {
              
                      if (($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())
                          && ($tblPrepare = $tblPrepareStudent->getTblPrepareCertificate())
              Severity: Minor
              Found in Application/Education/Certificate/Prepare/Service.php - About 1 day to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function setSubjectRow has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
              Open

                  private function setSubjectRow($array, $subjectName)
                  {
              
                      $course = '';
                      $grades = array();
              Severity: Minor
              Found in Application/Education/Certificate/Prepare/Abitur/BlockI.php - About 1 day to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function getMessageForSubjectGroup has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function getMessageForSubjectGroup()
                  {
                      $list = array();
                      if ($this->isFilterSet()
                          && ($tblDivisionSubject = $this->getTblDivisionSubject())
              Severity: Minor
              Found in Application/Education/Lesson/Division/Filter/Filter.php - About 1 day to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function setDivisionStudents has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
              Open

                  private static function setDivisionStudents(
                      &$Content,
                      TblPerson $tblPerson,
                      TblLevel $tblLevel,
                      TblDivision $tblDivision,
              Severity: Minor
              Found in Application/Document/Generator/Service/Kamenz/KamenzReportService.php - About 1 day to fix

              Cognitive Complexity

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

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

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

              Further reading

              Method formAccount has 206 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function formAccount(TblAccount $tblAccount = null)
                  {
              
                      $tblConsumer = Consumer::useService()->getConsumerBySession();
              
              
              Severity: Major
              Found in Application/Setting/Authorization/Account/Frontend.php - About 1 day to fix

                Service has 57 functions (exceeds 20 allowed). Consider refactoring.
                Open

                abstract class Service extends ServiceMinimumGrade
                {
                
                    const PREG_MATCH_DECIMAL_NUMBER = '!^[0-9]+((\.|,)[0-9]+)?$!is';
                
                
                Severity: Major
                Found in Application/Education/Graduation/Gradebook/ScoreRule/Service.php - About 1 day to fix

                  Method createCustodiesFromFile has 204 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function createCustodiesFromFile(
                          IFormInterface $Form = null,
                          UploadedFile $File = null,
                          $IsMother = null
                      ) {
                  Severity: Major
                  Found in Application/Transfer/Import/Schneeberg/Service.php - About 1 day to fix

                    Method frontendPrepareDiplomaSetting has 204 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function frontendPrepareDiplomaSetting(
                            $PrepareId = null,
                            $GroupId = null,
                            $SubjectId = null,
                            $Route = null,
                    Severity: Major
                    Found in Application/Education/Certificate/Prepare/Frontend.php - About 1 day to fix

                      File BeGs.php has 506 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      namespace SPHERE\Application\Api\Education\Certificate\Generator\Repository;
                      
                      use SPHERE\Application\Api\Education\Certificate\Generator\Certificate;
                      use SPHERE\Application\Education\Certificate\Generator\Repository\Element;
                      Severity: Major
                      Found in Application/Api/Education/Certificate/Generator/Repository/BeGs.php - About 1 day to fix
                        Severity
                        Category
                        Status
                        Source
                        Language