DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function widgetPersonGroupList has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

    public static function widgetPersonGroupList()
    {

        $tblGroupAll = Group::useService()->getGroupAllSorted();
        $tblGroupLockedList = array();
Severity: Minor
Found in Application/People/People.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 createBulkMinimumGradeCountList has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

    public function createBulkMinimumGradeCountList($MinimumGradeCount, $highlighted, TblGradeType $tblGradeType = null)
    {

        $Manager = $this->getEntityManager();

Severity: Minor
Found in Application/Education/Graduation/Gradebook/MinimumGradeCount/Data.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 frontendHeadmasterSelectDivision has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendHeadmasterSelectDivision($IsAllYears = false, $IsGroup = false, $YearId = null)
    {

        $Stage = new Stage('Zeugnisvorbereitung', 'Klasse auswählen');
        $this->setHeaderButtonList($Stage, View::HEADMASTER);
Severity: Minor
Found in Application/Education/Certificate/Prepare/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 setAvailableExamsSubjectsP4P5 has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

    private function setAvailableExamsSubjectsP4P5()
    {

        $this->setAvailableExamsSubjectToArray('Deutsch',false);
        $this->setAvailableExamsSubjectToArray('Mathematik',false);
Severity: Minor
Found in Application/Education/Certificate/Prepare/Abitur/BlockII.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 frontendShowCertificate has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendShowCertificate(
        $PrepareId = null,
        $GroupId = null,
        $PersonId = null,
        $Route = null
Severity: Minor
Found in Application/Education/Certificate/Prepare/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 getDivisionAllByName has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

    public function getDivisionAllByName($divisionName, TblYear $tblYear = null, TblType $tblType = null)
    {

        $divisionList = array();
        $divisionName = str_replace(' ', '', $divisionName);
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 saveCertificateRevision has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

    public function saveCertificateRevision(
        TblPerson $tblPerson,
        TblDivision $tblDivision,
        Certificate $Certificate,
        FilePointer $File,
Severity: Minor
Found in Application/Document/Storage/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 countDivisionSubjectGroupTeacherByDivision has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

    public
    function countDivisionSubjectGroupTeacherByDivision(
        TblDivision $tblDivision
    ) {

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

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

    public function buildPages(TblPerson $tblPerson = null)
    {

        $personId = $tblPerson ? $tblPerson->getId() : 0;

    File D01.php has 295 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/KamenzReportGS/D01.php - About 3 hrs to fix

      Method frontendApprovePreparePerson has 77 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Method getIsNotFulfilledByPerson has 77 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getIsNotFulfilledByPerson(
                TblPerson $tblPerson,
                TblSubject $tblSubject,
                TblSubjectGroup $tblSubjectGroup,
                TblDivisionSubject $tblDivisionSubject,
        Severity: Major
        Found in Application/Education/Lesson/Division/Filter/Filter.php - About 3 hrs to fix

          Method openExtraGradesModal has 76 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function openExtraGradesModal($DivisionId, $SubjectId, $PeriodId, $PersonId)
              {
          
                  if (!($tblDivision = Division::useService()->getDivisionById($DivisionId))) {
                      return (new Danger('Klasse nicht gefunden', new Exclamation()));
          Severity: Major
          Found in Application/Api/Education/Graduation/Gradebook/ApiGradebook.php - About 3 hrs to fix

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

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

              Method getProfile has 76 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function getProfile($personId)
                  {
              
                      $subjectAcronymForGrade = 'PRO';
                      if (($tblPerson = Person::useService()->getPersonById($personId))

                Method createInterestedPersonListExcel has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function createInterestedPersonListExcel($PersonList, $tblPersonList)
                    {
                
                        if (!empty($PersonList)) {
                
                
                Severity: Major
                Found in Application/Reporting/Custom/Chemnitz/Person/Service.php - About 3 hrs to fix

                  Method frontendStaffList has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function frontendStaffList()
                      {
                  
                          $Stage = new Stage('ESZC Auswertung', 'Liste der Mitarbeiter');
                  
                  
                  Severity: Major
                  Found in Application/Reporting/Custom/Chemnitz/Person/Frontend.php - About 3 hrs to fix

                    Method layoutPersonGroupList has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function layoutPersonGroupList($GroupId = '')
                        {
                    
                            $tblGroupList = array();
                    
                    
                    Severity: Major
                    Found in Application/Billing/Accounting/Debtor/Frontend.php - About 3 hrs to fix

                      Method frontendGenerateSetting has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function frontendGenerateSetting($GenerateCertificateId = null, $Data = null)
                          {
                      
                              $Stage = new Stage('Zeugnis generieren', 'Zusätzliche Einstellungen');
                              $Stage->addButton(new Standard('Zurück', '/Education/Certificate/Generate', new ChevronLeft()));
                      Severity: Major
                      Found in Application/Education/Certificate/Generate/Frontend.php - About 3 hrs to fix

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

                        <?php
                        namespace SPHERE\Application\Contact\Mail;
                        
                        use SPHERE\Application\Api\Contact\ApiMailToCompany;
                        use SPHERE\Application\Api\Contact\ApiMailToPerson;
                        Severity: Minor
                        Found in Application/Contact/Mail/Frontend.php - About 3 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language