DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function prepareOutput has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

    private function prepareOutput($Data)
    {

        foreach ((array)$Data as $Key => $Value) {
            if (0 === strpos($Key, 'Entity')) {
Severity: Minor
Found in Application/Platform/System/Archive/Frontend.php - About 3 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 sanitizeDivision2 has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

    protected function sanitizeDivision2($Value)
    {
        $LevelName = null;
        $DivisionName = null;
        if ($Value === '') {
Severity: Minor
Found in Application/Transfer/Indiware/Import/LectureshipGateway.php - About 3 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 frontendUpload has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendUpload(UploadedFile $File = null, $Item = '')
    {

        $Stage = new Stage('Fakturierung Grunddaten', 'importieren');

Severity: Minor
Found in Application/Billing/Inventory/Import/Frontend.php - About 3 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 frontendGroupPersonAdd has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendGroupPersonAdd(
        $Id = null,
        $DataAddPerson = null,
        $DataRemovePerson = null,
        $Filter = null,
Severity: Minor
Found in Application/People/Group/Frontend.php - About 3 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 frontendDestroyMinimumGradeCount has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendDestroyMinimumGradeCount(
        $Id = null,
        $Confirm = false
    ) {

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

    public function contentDestroyTest(Stage $Stage, $Id, $Confirm, $BasicRoute)
    {

        $tblTest = Evaluation::useService()->getTestById($Id);
        if ($tblTest) {
Severity: Minor
Found in Application/Education/Graduation/Evaluation/Frontend.php - About 3 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 getSubjectTeacherNameList has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

    public
    function getSubjectTeacherNameList(
        TblDivision $tblDivision,
        TblSubject $tblSubject,
        TblSubjectGroup $tblSubjectGroup = null
Severity: Minor
Found in Application/Education/Lesson/Division/Service.php - About 3 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 setProfile has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

    private static function setProfile(
        &$Content,
        $countProfileArray
    ) {

Severity: Minor
Found in Application/Document/Generator/Service/Kamenz/KamenzReportService.php - About 3 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 B01_1.php has 322 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/B01_1.php - About 3 hrs to fix

    Function ModCompleter has 93 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $.fn.ModCompleter = function(options)
        {
            var _self = this;
    
            // This is the easiest way to have default options.
    Severity: Major
    Found in Common/Script/ModCompleter.js - About 3 hrs to fix

      Method secondPage has 93 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Method getStudentFilterResultListBySerialLetter has 93 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getStudentFilterResultListBySerialLetter(
                TblSerialLetter $tblSerialLetter = null,
                $FilterGroupList = array(),
                $FilterStudentList = array(),
                $FilterYearList = array(),
        Severity: Major
        Found in Application/Reporting/SerialLetter/SerialLetterFilter.php - About 3 hrs to fix

          Method frontendIdentificationToken has 93 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function frontendIdentificationToken($tblAccount, $tblIdentification, $CredentialKey = null)
              {
                  $View = new Stage(new YubiKey().' Anmelden', '', $this->getIdentificationEnvironment());
          
                  $tblAccount = Account::useService()->getAccountById($tblAccount);
          Severity: Major
          Found in Application/Platform/Gatekeeper/Authentication/Frontend.php - About 3 hrs to fix

            Method getCauserTable has 93 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getCauserTable($GroupId)
                {
            
                    $TableContent = array();
                    if(($tblGroup = Group::useService()->getGroupById($GroupId))){
            Severity: Major
            Found in Application/Billing/Accounting/Causer/Frontend.php - About 3 hrs to fix

              Method formMinimumGradeCount has 93 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function formMinimumGradeCount()
                  {
              
                      if (($tblTestType = Evaluation::useService()->getTestTypeByIdentifier('TEST'))) {
                          $tblGradeTypeList = Gradebook::useService()->getGradeTypeAllByTestType($tblTestType);

                File LeavePoints.php has 321 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

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

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

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

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

                        public static function getContent($ShowAll = false)
                        {
                            $validationTable = array();
                    
                            if (!$ShowAll) {
                    Severity: Major
                    Found in Application/Api/Education/Division/ValidationFilter.php - About 3 hrs to fix

                      Method createExtendedClassList has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function createExtendedClassList(TblDivision $tblDivision)
                          {
                      
                              $tblPersonList = Division::useService()->getStudentAllByDivision($tblDivision);
                              $TableContent = array();
                      Severity: Major
                      Found in Application/Reporting/Standard/Person/Service.php - About 3 hrs to fix

                        Method createClassListExcel has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function createClassListExcel($PersonList, $tblPersonList)
                            {
                        
                                if (!empty( $PersonList )) {
                        
                        
                        Severity: Major
                        Found in Application/Reporting/Custom/Coswig/Person/Service.php - About 3 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language