DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function fetchDivision has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    protected function fetchDivision($Value)
    {

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

    public function createCsv($DivisionId = '')
    {


        $PersonList = array();
Severity: Minor
Found in Application/Transfer/Indiware/Export/Meta/Service.php - About 6 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 getMinimumGradeCountNumber has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    public function getMinimumGradeCountNumber(
        TblDivisionSubject $tblDivisionSubject,
        TblPerson $tblPerson,
        TblMinimumGradeCount $tblMinimumGradeCount
    ) {

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

    public function getPossibleCertificates(
        TblPrepareCertificate $tblPrepare,
        TblPerson $tblPerson,
        TblConsumer $tblConsumer = null
    ) {
Severity: Minor
Found in Application/Education/Certificate/Generate/Service.php - About 6 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 createCertificateSetting has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    public function createCertificateSetting(
        IFormInterface $Form,
        TblCertificate $tblCertificate,
        $GradeList,
        $SubjectList
Severity: Minor
Found in Application/Education/Certificate/Generator/Service.php - About 6 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 getYearAllByDate has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    public function getYearAllByDate(\DateTime $Date)
    {

        $EntityList = array();
        $tblYearAll = Term::useService()->getYearAll();
Severity: Minor
Found in Application/Education/Lesson/Term/Service.php - About 6 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 addSubjectWithoutGroups has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    public
    function addSubjectWithoutGroups(
        TblDivision $tblDivision,
        TblDivision $tblDivisionCopy
    ) {
Severity: Minor
Found in Application/Education/Lesson/Division/Service.php - About 6 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 sortDivisionStudentWithGenderByProperty has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    public function sortDivisionStudentWithGenderByProperty(
        TblDivision $tblDivision,
        $Property = 'LastFirstName',
        $Sorter = null,
        $Order = Sorter::ORDER_ASC
Severity: Minor
Found in Application/Education/Lesson/Division/Service.php - About 6 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 getOrientation has 160 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private static function getOrientation($personId, $TextSize = self::TEXT_SIZE, $IsGradeUnderlined = false)
    {

        $slice = new Slice();
        $sectionList = array();

    Method frontendStudentCourseUpload has 160 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function frontendStudentCourseUpload(
            UploadedFile $File = null,
            $tblYear = null,
            $Level = null
        ) {
    Severity: Major
    Found in Application/Transfer/Indiware/Import/StudentCourse.php - About 6 hrs to fix

      File StudentFilter.php has 433 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      namespace SPHERE\Application\Api\MassReplace;
      
      use SPHERE\Application\Education\Lesson\Division\Division;
      Severity: Minor
      Found in Application/Api/MassReplace/StudentFilter.php - About 6 hrs to fix

        File Database.php has 432 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        namespace SPHERE\Application\Platform\System\Database;
        
        use SPHERE\Application\IModuleInterface;
        use SPHERE\Application\IServiceInterface;
        Severity: Minor
        Found in Application/Platform/System/Database/Database.php - About 6 hrs to fix

          Method formDebtorSelection has 159 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function formDebtorSelection($Identifier = '', $PersonId = '', $ItemId = '', $DebtorSelectionId = '')
              {
          
                  // choose between Add and Edit
                  $SaveButton = new Primary('Speichern', self::getEndpoint(), new Save());
          Severity: Major
          Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 6 hrs to fix

            Method getContent has 159 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/KamenzReportGym/E11.php - About 6 hrs to fix

              Method getContent has 159 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/KamenzReportGym/E12.php - About 6 hrs to fix

                TblIndiwareStudentSubjectOrder has 46 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class TblIndiwareStudentSubjectOrder extends Element
                {
                
                    const ATTR_SERVICE_TBL_PERSON = 'serviceTblPerson';
                
                

                  Method getContent has 158 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/KamenzReportGym/E17.php - About 6 hrs to fix

                    Method frontendLanguageList has 158 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function frontendLanguageList($DivisionId = null)
                        {
                            $Stage = new Stage('EZSH Auswertung', 'Klassenliste Fremdsprachen');
                            if (null !== $DivisionId) {
                                $Stage->addButton(new Standard('Zurück', '/Reporting/Custom/Herrnhut/Person/LanguageList', new ChevronLeft()));
                    Severity: Major
                    Found in Application/Reporting/Custom/Herrnhut/Person/Frontend.php - About 6 hrs to fix

                      File HorJ.php has 429 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      namespace SPHERE\Application\Api\Education\Certificate\Generator\Repository\FESH;
                      
                      use SPHERE\Application\Api\Education\Certificate\Generator\Certificate;
                      use SPHERE\Application\Education\Certificate\Generator\Repository\Element;

                        Method frontendLayoutCombine has 157 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function frontendLayoutCombine(TblCompany $tblCompany)
                            {
                        
                                $tblAddressAllUnsorted = Address::useService()->getAddressAllByCompany($tblCompany);
                        
                        
                        Severity: Major
                        Found in Application/Setting/Consumer/School/Frontend.php - About 6 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language