DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Method openDeleteSupportModal has 74 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function openDeleteSupportModal($PersonId, $SupportId)
    {
        $tblSupport = Student::useService()->getSupportById($SupportId);
        if(!$tblSupport){
            return new Danger('Eintrag nicht gefunden.');
Severity: Major
Found in Application/Api/People/Meta/Support/ApiSupport.php - About 2 hrs to fix

    Method frontendEditGenerate has 74 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function frontendEditGenerate($Id = null, $Data = null)
        {
    
            $Stage = new Stage('Zeugnis generieren', 'Bearbeiten');
            $Stage->setMessage('Die Notenaufträge können nur geändert werden bis ein Zeugnis freigeben wurde.');
    Severity: Major
    Found in Application/Education/Certificate/Generate/Frontend.php - About 2 hrs to fix

      File LevelTen.php has 290 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * Created by PhpStorm.
       * User: Kauschke
       * Date: 16.03.2018
      Severity: Minor
      Found in Application/Education/Certificate/Prepare/Abitur/LevelTen.php - About 2 hrs to fix

        Method frontendResetApprovePreparePerson has 74 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function frontendResetApprovePreparePerson(
                $PrepareId = null,
                $PersonId = null,
                $LeaveStudentId = null,
                $IsLeave = false,
        Severity: Major
        Found in Application/Education/Certificate/Approve/Frontend.php - About 2 hrs to fix

          Method frontendPrintCertificateHistoryPerson has 74 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function frontendPrintCertificateHistoryPerson($PersonId = null)
              {
          
                  $Stage = new Stage('Zeugnis', 'Auswahl');
                  $Stage->addButton(new Standard('Zurück', '/Education/Certificate/PrintCertificate/History', new ChevronLeft()));
          Severity: Major
          Found in Application/Education/Certificate/PrintCertificate/Frontend.php - About 2 hrs to fix

            File AbstractNode.php has 290 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            namespace SPHERE\System\Database\Filter\Link;
            
            use SPHERE\System\Cache\Handler\DataCacheHandler;
            use SPHERE\System\Database\Binding\AbstractService;
            Severity: Minor
            Found in System/Database/Filter/Link/AbstractNode.php - About 2 hrs to fix

              Method setNewSchoolStarter has 74 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private static function setNewSchoolStarter(
                      &$Content,
                      TblPerson $tblPerson,
                      TblStudent $tblStudent,
                      TblLevel $tblLevel,
              Severity: Major
              Found in Application/Document/Generator/Service/Kamenz/KamenzReportService.php - About 2 hrs to fix

                File E01.php has 289 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

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

                  Method reloadAbsenceContent has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function reloadAbsenceContent($Data = null)
                      {
                          if ($Data['Date'] == null) {
                              $date = (new \DateTime('now'))->format('d.m.Y');
                          } else {
                  Severity: Major
                  Found in Application/Api/Reporting/Standard/ApiStandard.php - About 2 hrs to fix

                    Method downloadMultiLeavePdf has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function downloadMultiLeavePdf($DivisionId = null, $Name = 'Abgangszeugnis', $Redirect = true)
                        {
                    
                            if ($Redirect) {
                                return self::displayWaitingPage('/Api/Education/Certificate/Generator/DownLoadMultiLeavePdf', array(
                    Severity: Major
                    Found in Application/Api/Education/Certificate/Generator/Creator.php - About 2 hrs to fix

                      Method frontendWelcome has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function frontendWelcome()
                          {
                      
                              $Stage = new Stage('Willkommen', '', '');
                              $IsMaintenance = false;
                      Severity: Major
                      Found in Application/Platform/Gatekeeper/Authentication/Frontend.php - About 2 hrs to fix

                        Method frontendInvoiceCauserView has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function frontendInvoiceCauserView($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 addTest has 73 lines of code (exceeds 25 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: Major
                          Found in Application/Education/Graduation/Gradebook/Frontend.php - About 2 hrs to fix

                            Method updatePrepareInformationList has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function updatePrepareInformationList(
                                    IFormInterface $Stage = null,
                                    TblPrepareCertificate $tblPrepare,
                                    TblGroup $tblGroup = null,
                                    $Route,
                            Severity: Major
                            Found in Application/Education/Certificate/Prepare/Service.php - About 2 hrs to fix

                              Method frontendGradeInformation has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function frontendGradeInformation($DivisionId = null, $Route = 'Teacher')
                                  {
                              
                                      $Stage = new Stage('Noteninformation', 'Übersicht');
                                      $Stage->addButton(new Standard(
                              Severity: Major
                              Found in Application/Education/Certificate/GradeInformation/Frontend.php - About 2 hrs to fix

                                Method getFilterForm has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public static function getFilterForm(TblType $tblSchoolType = null)
                                    {
                                
                                        $tblCourseAll = Course::useService()->getCourseAll();
                                        $tblGroupAll = Group::useService()->getGroupAll();
                                Severity: Major
                                Found in Application/Education/Lesson/Division/Filter/Frontend.php - About 2 hrs to fix

                                  Method frontendDivisionDestroy has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function frontendDivisionDestroy($Id = null, $Confirm = false)
                                      {
                                  
                                          $Stage = new Stage('Klasse', 'Löschen');
                                          if ($Id && ( $tblDivision = Division::useService()->getDivisionById($Id) )) {
                                  Severity: Major
                                  Found in Application/Education/Lesson/Division/Frontend.php - About 2 hrs to fix

                                    Function formAccount has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        private function formAccount(TblAccount $tblAccount = null)
                                        {
                                    
                                            $tblConsumer = Consumer::useService()->getConsumerBySession();
                                    
                                    
                                    Severity: Minor
                                    Found in Application/Setting/Authorization/Account/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 clearPassword has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public function clearPassword($GroupByTime, $Confirm = false)
                                        {
                                            $Stage = new Stage('Benutzer', 'Klartext Passwörter');
                                            if ($GroupByTime) {
                                                $GroupByTime = new \DateTime($GroupByTime);
                                    Severity: Minor
                                    Found in Application/Setting/User/Account/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 setFieldValue has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        private function setFieldValue($DataPost)
                                        {
                                    
                                            //getPerson
                                            $this->FieldValue['PersonId'] = $PersonId = (isset($DataPost['PersonId']) && $DataPost['PersonId'] != '' ? $DataPost['PersonId'] : false);
                                    Severity: Minor
                                    Found in Application/Api/Document/Standard/Repository/EnrollmentDocument.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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language