DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

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

    private static function getCallingFunctionName($completeTrace = false)
    {
        if (function_exists('debug_backtrace')) {
            $BackTrace = debug_backtrace();
            if ($completeTrace) {
Severity: Minor
Found in System/Extension/Repository/Debugger.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

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

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

    Method updatePassword has 72 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function updatePassword(
            IFormInterface $Form,
            TblAccount $tblAccount,
            $CredentialLock,
            $CredentialLockSafety
    Severity: Major
    Found in Application/Setting/MyAccount/Service.php - About 2 hrs to fix

      Method getStudentTableContent has 72 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getStudentTableContent($Result, $MaxResult = 800)
          {
      
              $SearchResult = array();
              if (!empty($Result)) {
      Severity: Major
      Found in Application/Setting/User/Account/Frontend.php - About 2 hrs to fix

        Method getEZSHDateSignCustom has 72 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function getEZSHDateSignCustom($personId)
            {
        
                $SectionList = array();
                $Section = new Section();

          Method buildPageOne has 72 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private function buildPageOne($AccountId)
              {
          
                  return (new Page())
                      ->addSlice((new Slice())

            Method loadDocumentOverviewContent has 72 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function loadDocumentOverviewContent()
                {
                    if (($tblDocumentList = Document::useService()->getDocumentAll())) {
                        $contentTable = array();
                        foreach ($tblDocumentList as $tblDocument) {
            Severity: Major
            Found in Application/Billing/Inventory/Document/Frontend.php - About 2 hrs to fix

              Method getProspectContent has 72 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function getProspectContent($PersonId = null)
                  {
                      if (($tblPerson = Person::useService()->getPersonById($PersonId))
                          && ($tblGroup = Group::useService()->getGroupByMetaTable('PROSPECT'))
                          && Group::useService()->existsGroupPerson($tblGroup, $tblPerson)
              Severity: Major
              Found in Application/People/Person/Frontend/FrontendProspect.php - About 2 hrs to fix

                Method updateTest has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function updateTest(IFormInterface $Stage = null, $Id, $Test, $BasicRoute)
                    {
                
                        /**
                         * Skip to Frontend
                Severity: Major
                Found in Application/Education/Graduation/Evaluation/Service.php - About 2 hrs to fix

                  Method formTest has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function formTest(
                          TblDivision $tblDivision,
                          TblYear $tblYear,
                          TblScoreRule $tblScoreRule = null,
                          TblDivisionSubject $tblDivisionSubjectSelected = null
                  Severity: Major
                  Found in Application/Education/Graduation/Evaluation/Frontend.php - About 2 hrs to fix

                    Method updateAbsence has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function updateAbsence(IFormInterface $Stage = null, TblAbsence $tblAbsence, $BasicRoute = '', $Data)
                        {
                    
                            /**
                             * Skip to Frontend
                    Severity: Major
                    Found in Application/Education/ClassRegister/Absence/Service.php - About 2 hrs to fix

                      File B02.php has 286 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/KamenzReport/B02.php - About 2 hrs to fix

                        Method frontendGroup has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function frontendGroup($Group)
                            {
                        
                                $Stage = new Stage('Gruppen', 'Übersicht');
                                $Stage->addButton(new Standard('Zurück', '/Corporation', new ChevronLeft()));
                        Severity: Major
                        Found in Application/Corporation/Group/Frontend.php - About 2 hrs to fix

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

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

                            Method frontendNursery has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function frontendNursery()
                                {
                            
                                    $Stage = new Stage('Individuelle Auswertung', 'Stichtagsmeldung Hort');
                                    // mark persons without this city code
                            Severity: Major
                            Found in Application/Reporting/Custom/Radebeul/Person/Frontend.php - About 2 hrs to fix

                              Method getStudentFilterResult has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getStudentFilterResult($Person, $Year, $Division, $PersonGroup)
                                  {
                              
                                      $Pile = new Pile(Pile::JOIN_TYPE_INNER);
                                      $Pile->addPile((new ViewPerson())->getViewService(), new ViewPerson(),
                              Severity: Major
                              Found in Application/Reporting/Standard/Person/Service.php - About 2 hrs to fix

                                Method createGroupList has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function createGroupList(TblGroup $tblGroup)
                                    {
                                
                                        $tblCompanyList = Group::useService()->getCompanyAllByGroup($tblGroup);
                                        $count = 0;
                                Severity: Major
                                Found in Application/Reporting/Standard/Company/Service.php - About 2 hrs to fix

                                  Method migrateReporting has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function migrateReporting()
                                      {
                                          // All available Consumer
                                          try {
                                              $ConsumerList = $this->getConsumerList();
                                  Severity: Major
                                  Found in Application/Platform/System/Database/ReportingUpgrade.php - About 2 hrs to fix

                                    Method setTableTblIndiwareStudentSubjectOrder has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private function setTableTblIndiwareStudentSubjectOrder(Schema &$Schema)
                                        {
                                    
                                            $Table = $this->getConnection()->createTable($Schema, 'tblIndiwareStudentSubjectOrder');
                                            if (!$this->getConnection()->hasColumn('tblIndiwareStudentSubjectOrder', 'serviceTblTask')) {

                                      File TblBasket.php has 285 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      <?php
                                      
                                      namespace SPHERE\Application\Billing\Bookkeeping\Basket\Service\Entity;
                                      
                                      use Doctrine\ORM\Mapping\Cache;
                                      Severity: Minor
                                      Found in Application/Billing/Bookkeeping/Basket/Service/Entity/TblBasket.php - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language