DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Method createGroupListExcel has 148 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function createGroupListExcel($PersonList, $tblPersonList, $GroupId)
    {

        $tblGroup = Group::useService()->getGroupById($GroupId);
        if (!empty($PersonList) && $tblGroup) {
Severity: Major
Found in Application/Reporting/Standard/Person/Service.php - About 5 hrs to fix

    Function frontendSettings has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
    Open

        public function frontendSettings($Data = null)
        {
            $stage = new Stage('Mandant' , 'Einstellungen');
    
            if (($tblAccount = Account::useService()->getAccountBySession())
    Severity: Minor
    Found in Application/Setting/Consumer/Setting/Frontend.php - About 5 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 getCMSSubjectLanes has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getCMSSubjectLanes($personId, $IsHeadline = true, $Height = '270px')
        {
    
            $SubjectSlice = (new Slice());
    
    

    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 getFormField has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getFormField( $PropertyName, $Placeholder = null, $Label = null, IIconInterface $Icon = null,
            $doResetCount = false, $ViewType = TblWorkSpace::VIEW_TYPE_ALL  )
        {
    
            switch ($PropertyName) {
    Severity: Minor
    Found in Application/Reporting/Individual/Service/Entity/ViewPersonContact.php - About 5 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 createInvoiceDebtorListExcel has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
    Open

        public function createInvoiceDebtorListExcel(
            $Year,
            $Month,
            $BasketName
        ) {
    Severity: Minor
    Found in Application/Billing/Bookkeeping/Invoice/Service.php - About 5 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 getTudorGroupAll has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getTudorGroupAll(TblPerson $tblPerson = null)
        {
            $list = array();
            if (($tblStudentGroup = $this->getGroupByMetaTable(TblGroup::META_TABLE_STUDENT))
                && ($tblTudorGroup = $this->getGroupByMetaTable(TblGroup::META_TABLE_TUDOR))
    Severity: Minor
    Found in Application/People/Group/Service.php - About 5 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 setupDatabaseContent has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
    Open

        public function setupDatabaseContent()
        {
    
            $tblStudentAgreementCategory = $this->createStudentAgreementCategory(
                'Foto des Schülers',
    Severity: Minor
    Found in Application/People/Meta/Student/Service/Data.php - About 5 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 setStudentOverviewStage has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
    Open

        private function setStudentOverviewStage(
            $DivisionId,
            $GroupId,
            $PersonId,
            Stage $Stage,
    Severity: Minor
    Found in Application/Education/Graduation/Gradebook/Frontend.php - About 5 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 frontendTeacherDivisionList has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
    Open

        public function frontendTeacherDivisionList($IsAllYears = false, $IsGroup = false, $YearId = null)
        {
    
            $Stage = new Stage('Schülerübersicht', 'Klasse des Schülers Auswählen');
            $Stage->addButton(
    Severity: Minor
    Found in Application/Education/Graduation/Gradebook/Frontend.php - About 5 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 updatePrepareBehaviorGrades has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
    Open

        public function updatePrepareBehaviorGrades(
            IFormInterface $Stage = null,
            TblPrepareCertificate $tblPrepare,
            TblGroup $tblGroup = null,
            TblGradeType $tblGradeType,
    Severity: Minor
    Found in Application/Education/Certificate/Prepare/Service.php - About 5 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 frontendDestroyGenerate has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
    Open

        public function frontendDestroyGenerate($Id = null, $Confirm = false)
        {
    
            $Stage = new Stage('Zeugnisgenerierung', 'Löschen');
    
    
    Severity: Minor
    Found in Application/Education/Certificate/Generate/Frontend.php - About 5 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 setSubjectRow has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
    Open

        private function setSubjectRow($array, $subjectName)
        {
    
            $course = '';
            $grades = array();
    Severity: Minor
    Found in Application/Education/Certificate/Prepare/Abitur/LeavePoints.php - About 5 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 buildPages has 147 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Method getContent has 147 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function getContent()
          {
              $sliceList = array();
      
              $sliceList[] = (new Slice())
      Severity: Major
      Found in Application/Api/Document/Standard/Repository/KamenzReportGS/E04_1.php - About 5 hrs to fix

        Method buildRemarkPage has 147 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function buildRemarkPage(TblType $tblType = null)
            {
                $textSize = '11px';
                $textSizeSmall = '9px';
                $height = '15px';

          Method frontendSelectHoliday has 147 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function frontendSelectHoliday(
                  $YearId = null,
                  $DataAddHoliday = null,
                  $DataRemoveHoliday = null
              ) {
          Severity: Major
          Found in Application/Education/Lesson/Term/Frontend.php - About 5 hrs to fix

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

            <?php
            /**
             * Created by PhpStorm.
             * User: Kauschke
             * Date: 12.10.2017
            Severity: Minor
            Found in Application/Api/Document/Standard/Repository/KamenzReport/E01.php - About 5 hrs to fix

              Method __construct has 146 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function __construct($Chapter = null, $Page = null, $Search = null)
                  {
              
                      $this->ShowChapter = $Chapter;
                      $this->ShowPage = $Page;
              Severity: Major
              Found in Common/Documentation/Content/StyleBook.php - About 5 hrs to fix

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

                class Service extends Support
                {
                
                    /**
                     * @return false|ViewStudent[]
                Severity: Minor
                Found in Application/People/Meta/Student/Service.php - About 5 hrs to fix

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

                      public function buildPages(TblPerson $tblPerson = null)
                      {
                  
                          $personId = $tblPerson ? $tblPerson->getId() : 0;
                  
                  
                    Severity
                    Category
                    Status
                    Source
                    Language