DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

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

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

    public function frontendAbsence(
        $DivisionId = null,
        $PersonId = null,
        $BasicRoute = '/Education/ClassRegister/Teacher',
        $Data = null
Severity: Minor
Found in Application/Education/ClassRegister/Absence/Frontend.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

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

    public function frontendSubjectGroupChange($Id = null, $SubjectId = null, $DivisionId = null, $DivisionSubjectId = null, $Group = null)
    {

        if ($Id === null || $SubjectId === null || $DivisionId === null || $DivisionSubjectId === null) {
            $Stage = new Stage('Fach-Gruppen', 'Bearbeiten');
Severity: Minor
Found in Application/Education/Lesson/Division/Frontend.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

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

    private function buildView()
    {

        $TableList = $this->LinkList;
        $QueryBuilder = $this->Structure->getQueryBuilder();
Severity: Minor
Found in System/Database/Fitting/View.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

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

    private static function countDivisionStudentsForSecondarySchool(
        &$countDivisionStudents,
        TblDivision $tblDivision,
        TblLevel $tblLevel,
        TblCourse $tblCourse = null,
Severity: Minor
Found in Application/Document/Generator/Service/Kamenz/KamenzReportService.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

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

    public function addSubjectToDivisionWithGroup(
        IFormInterface $Form,
        TblDivision $tblDivision,
        TblSubject $tblSubject,
        $Group,
Severity: Minor
Found in Application/Education/Lesson/Division/Service.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 firstPage has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function firstPage($personId)
    {
        $Page = (new Page())
            ->addSlice(
                (new Slice())

    Method firstPage has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function firstPage($personId)
        {
            $Page = (new Page())
                ->addSlice(
                    (new Slice())

      File E02.php has 260 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * Created by PhpStorm.
       * User: lehmann
       * Date: 23.06.2017
      Severity: Minor
      Found in Application/Api/Document/Standard/Repository/KamenzReportGS/E02.php - About 2 hrs to fix

        File Frontend.php has 260 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        namespace SPHERE\Application\Reporting\Custom\Muldental\Person;
        
        use SPHERE\Application\Education\Lesson\Division\Division;
        Severity: Minor
        Found in Application/Reporting/Custom/Muldental/Person/Frontend.php - About 2 hrs to fix

          Method formDocument has 56 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function formDocument($DocumentId = null, $setPost = false)
              {
                  if ($DocumentId && ($tblDocument = Document::useService()->getDocumentById($DocumentId))) {
                      // beim Checken der Inputfeldern darf der Post nicht gesetzt werden
                      if ($setPost) {
          Severity: Major
          Found in Application/Billing/Inventory/Document/Frontend.php - About 2 hrs to fix

            Method frontendEditGroup has 56 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function frontendEditGroup($Id, $Group = null)
                {
            
                    $Stage = new Stage('Gruppe', 'Bearbeiten');
                    $Stage->addButton(new Standard('Zurück', '/People/Group', new ChevronLeft()));
            Severity: Major
            Found in Application/People/Group/Frontend.php - About 2 hrs to fix

              Method updatePersonService has 56 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function updatePersonService(TblPerson $tblPerson, $Person)
                  {
                      // SSw-699 Bearbeitung Stammdaten (Anrede -> automatisches Geschlecht)
                      $updateGender = false;
                      $salutationId = ($tblSalutationOld = $tblPerson->getTblSalutation()) ? $tblSalutationOld->getId() : 0;
              Severity: Major
              Found in Application/People/Person/Service.php - About 2 hrs to fix

                Method getEditProspectForm has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function getEditProspectForm(TblPerson $tblPerson = null)
                    {
                
                        $reservationYearAll = array();
                        $tblProspectReservationAll = Prospect::useService()->getProspectReservationAll();
                Severity: Major
                Found in Application/People/Person/Frontend/FrontendProspect.php - About 2 hrs to fix

                  Method frontendHeadmasterTaskEdit has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function frontendHeadmasterTaskEdit($Id = null, $Task = null)
                      {
                  
                          $Stage = new Stage('Notenauftrag', 'Bearbeiten');
                  
                  
                  Severity: Major
                  Found in Application/Education/Graduation/Evaluation/Frontend.php - About 2 hrs to fix

                    File Frontend.php has 259 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    /**
                     * Created by PhpStorm.
                     * User: Kauschke
                     * Date: 27.04.2017
                    Severity: Minor
                    Found in Application/Document/Standard/StudentCard/Frontend.php - About 2 hrs to fix

                      Method registerModule has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function registerModule()
                          {
                              Main::getDisplay()->addModuleNavigation(
                                  new Link(new Link\Route(__NAMESPACE__.'/Student/Add'), new Link\Name('Neu Schüler'))
                              );
                      Severity: Major
                      Found in Application/Setting/User/Account/Account.php - About 2 hrs to fix

                        Method checkFormAddressToPerson has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function checkFormAddressToPerson(
                                TblPerson $tblPerson,
                                $Street,
                                $City,
                                $Type,
                        Severity: Major
                        Found in Application/Contact/Address/Service.php - About 2 hrs to fix

                          Method buildPage has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function buildPage()
                              {
                                  return (new Page())
                                      ->addSlice((new Slice())
                                          ->addSection((new Section())

                            Method setPersonAddressSelection has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function setPersonAddressSelection(
                                    IFormInterface $Form,
                                    TblSerialLetter $tblSerialLetter,
                                    TblPerson $tblPerson,
                                    $Check,
                            Severity: Major
                            Found in Application/Reporting/SerialLetter/Service.php - About 2 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language