DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function setExamsSetting has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    private function setExamsSetting(
        TblPrepareCertificate $tblPrepare,
        TblDivision $tblDivision,
        TblGroup $tblGroup = null,
        $tblTestList,
Severity: Minor
Found in Application/Education/Certificate/Prepare/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 setLeaveContentForSekTwo has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    private function setLeaveContentForSekTwo(
        TblCertificate $tblCertificate = null,
        TblLeaveStudent $tblLeaveStudent = null,
        TblDivision $tblDivision = null,
        TblPerson $tblPerson = null,
Severity: Minor
Found in Application/Education/Certificate/Prepare/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 createGradeInformation has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    public function createGradeInformation(
        IFormInterface $Stage = null,
        TblDivision $tblDivision,
        $Route = 'Teacher',
        $Data
Severity: Minor
Found in Application/Education/Certificate/GradeInformation/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

Function frontendSubjectTeacherAdd has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendSubjectTeacherAdd($Id = null, $DivisionSubjectId = null, $SubjectTeacherId = null, $PersonId = null)
    {

        $tblDivision = $Id === null ? false : Division::useService()->getDivisionById($Id);
        if (!$tblDivision) {
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 changeSubject has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    public function changeSubject(IFormInterface $Form, $Subject, $Id)
    {

        /**
         * Skip to Frontend
Severity: Minor
Found in Application/Education/Lesson/Subject/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

Function frontendLinkPerson has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendLinkPerson($Id = null)
    {

        $Stage = new Stage('', 'Zuordnung');
        $Stage->addButton(new Standard('Zurück', '/Education/Lesson/Subject', new ChevronLeft()));
Severity: Minor
Found in Application/Education/Lesson/Subject/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

Method frontendDestroyToken has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function frontendDestroyToken($Id, $Confirm = false)
    {

        $Stage = new Stage('Hardware-Schlüssel', 'Löschen');
        if ($Id) {
Severity: Major
Found in Application/Setting/Authorization/Token/Frontend.php - About 2 hrs to fix

    Method getCMSHeadGrade has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function getCMSHeadGrade($personId)
        {
    
            $GradeSlice = (new Slice());
    
    

      Method getESRLHeadGrade has 60 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function getESRLHeadGrade($personId)
          {
      
              $GradeSlice = (new Slice());
      
      

        Method getPage has 60 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getPage($personId, $titleText, $isSignatureExtended)
            {
                return (new Page())
                    ->addSlice((new Slice())
                        ->stylePaddingLeft('16px')

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

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

            Method frontendRole has 60 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function frontendRole($Name, $IsSecure = false, $IsIndividual = false)
                {
            
                    $Stage = new Stage('Berechtigungen', 'Rollen');
                    $this->menuButton($Stage);
            Severity: Major
            Found in Application/Platform/Gatekeeper/Authorization/Access/Frontend.php - About 2 hrs to fix

              Method UpdatePerson has 60 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function UpdatePerson()
                  {
              
                      $tblPersonAll = Person::useService()->getPersonAll();
                      $PersonList = array();
              Severity: Major
              Found in Application/Platform/System/Anonymous/Service.php - About 2 hrs to fix

                Method frontendDataMaintenance has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function frontendDataMaintenance()
                    {
                
                        $Stage = new Stage('Datenpflege');
                        // Schüler Account Zählung
                Severity: Major
                Found in Application/Platform/System/DataMaintenance/DataMaintenance.php - About 2 hrs to fix

                  Method formSubjectCourse has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function formSubjectCourse(TblIndiwareImportStudent $tblIndiwareImportStudent, TblYear $tblYear = null)
                      {
                  
                          $FormSubjectAll = array();
                          $tblSubjectList = Subject::useService()->getSubjectAll();
                  Severity: Major
                  Found in Application/Transfer/Indiware/Import/StudentCourse.php - About 2 hrs to fix

                    Method registerApplication has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function registerApplication()
                        {
                    
                            FuxSchool::registerModule();
                            Schulstiftung::registerModule();
                    Severity: Major
                    Found in Application/Transfer/Import/Import.php - About 2 hrs to fix

                      Method frontendInvoiceView has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function frontendInvoiceView($Invoice = array())
                          {
                              if(empty($Invoice)){
                                  $Now = new \DateTime();
                                  $Invoice['Year'] = $Now->format('Y');
                      Severity: Major
                      Found in Application/Billing/Bookkeeping/Invoice/Frontend.php - About 2 hrs to fix

                        Method calcSubjectGradesAverageOthers has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

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

                          Method frontendPrintCertificateHistory has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function frontendPrintCertificateHistory()
                              {
                          
                                  $Stage = new Stage('Zeugnis', 'Person auswählen');
                                  $Stage->addButton(new Standard(
                          Severity: Major
                          Found in Application/Education/Certificate/PrintCertificate/Frontend.php - About 2 hrs to fix

                            Method updateGenerateCertificate has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function updateGenerateCertificate(
                                    IFormInterface $Form = null,
                                    TblGenerateCertificate $tblGenerateCertificate,
                                    $Data = null
                                ) {
                            Severity: Major
                            Found in Application/Education/Certificate/Generate/Service.php - About 2 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language