DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function createDatevCsv has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    public function createDatevCsv(TblBasket $tblBasket)
    {

        $tblInvoiceList = Invoice::useService()->getInvoiceByBasket($tblBasket);
        if(!$tblInvoiceList){
Severity: Minor
Found in Application/Billing/Bookkeeping/Balance/Service.php - About 4 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 getPdfForm has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    public function getPdfForm(TblItem $tblItem, $tblDocumentList, $countPdfs, $Balance = null, $Data = null)
    {

        $Location = '';
        $Date = '';
Severity: Minor
Found in Application/Billing/Bookkeeping/Balance/Frontend.php - About 4 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 getSupportByPersonNewest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    public function getSupportByPersonNewest(TblPerson $tblPerson, $Type = array())
    {

        $tblSupportMatch = false;
        if(($tblSupportList = $this->getSupportByPerson($tblPerson))){
Severity: Minor
Found in Application/People/Meta/Student/Service/Service/Support.php - About 4 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 createTicket has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    public function createTicket(IFormInterface $Form = null, $Ticket, $Attachment)
    {

        /**
         * Skip to Frontend
Severity: Minor
Found in Application/Manual/Support/Service.php - About 4 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 updateSupport has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    public function updateSupport($PersonId, $SupportId, $Data = array())
    {


        $tblSupport = Student::useService()->getSupportById($SupportId);
Severity: Minor
Found in Application/People/Meta/Student/Service/Service/Support.php - About 4 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 setTableContentForAppointedDateTask has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    private function setTableContentForAppointedDateTask(
        TblDivision $tblDivision,
        TblTest $tblTest,
        TblSubject $tblSubject,
        TblPerson $tblPerson,
Severity: Minor
Found in Application/Education/Graduation/Evaluation/Frontend.php - About 4 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 setPrepareDivisionSelectData has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    private function setPrepareDivisionSelectData($tblDivision, $Route, $tableData, $GroupId = false)
    {

        /** @var TblDivision $tblDivision */
        $tblPrepareAllByDivision = Prepare::useService()->getPrepareAllByDivision($tblDivision);
Severity: Minor
Found in Application/Education/Certificate/Prepare/Frontend.php - About 4 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 sortSubjects has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    private function sortSubjects(TblPrepareCertificate $tblPrepare, $tblTestList)
    {
        $tblCertificate = false;
        if (($tblDivision = $tblPrepare->getServiceTblDivision())
            && ($tblLevel = $tblDivision->getTblLevel())
Severity: Minor
Found in Application/Education/Certificate/Prepare/Frontend.php - About 4 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 getDays has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    public function getDays(\DateTime $tillDate = null)
    {

        $countDays = 0;
        $fromDate = new \DateTime($this->getFromDate());

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

    public function getStudentByDivisionSubject(
        TblDivisionSubject $tblDivisionSubject,
        $withInActive = false
    ) {

Severity: Minor
Found in Application/Education/Lesson/Division/Service/Data.php - About 4 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 setCourses has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    private static function setCourses(
        &$Content,
        $countAdvancedCourseArray,
        $countBasisCourseArray
    ) {
Severity: Minor
Found in Application/Document/Generator/Service/Kamenz/KamenzReportService.php - About 4 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 __construct has 102 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __construct(
        $Name,
        $Label = '',
        $Data = array(),
        IIconInterface $Icon = null,
Severity: Major
Found in Common/Frontend/Form/Repository/Field/SelectBox.php - About 4 hrs to fix

    Method getSubjectLanesForRadebeul has 102 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function getSubjectLanesForRadebeul(
            $personId,
            $TextColor = 'black',
            $TextSize = '13px',
            $GradeFieldBackgroundColor = 'rgb(224,226,231)',
    Severity: Major
    Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 4 hrs to fix

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

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

        Method setRow has 102 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private static function setRow(&$sliceList, $identifier, $name, $part, $paddingLeft = '50px')
            {
        
                $section = new Section();
                $section
        Severity: Major
        Found in Application/Api/Document/Standard/Repository/KamenzReport/E01.php - About 4 hrs to fix

          Method registerModule has 102 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function registerModule()
              {
          
                  /**
                   * Navigation
          Severity: Major
          Found in Application/Education/Graduation/Evaluation/Evaluation.php - About 4 hrs to fix

            Method frontendTeacherSelectDivision has 102 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function frontendTeacherSelectDivision($IsAllYears = false, $IsGroup = false, $YearId = null)
                {
            
                    $Stage = new Stage('Zeugnisvorbereitung', 'Klasse auswählen');
                    $this->setHeaderButtonList($Stage, View::TEACHER);
            Severity: Major
            Found in Application/Education/Certificate/Prepare/Frontend.php - About 4 hrs to fix

              Method showOpenInvoice has 101 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function showOpenInvoice($BasketId = '')
                  {
              
                      if(Basket::useService()->getBasketById($BasketId)){
                          $TableContent = array();
              Severity: Major
              Found in Application/Api/Billing/Sepa/ApiSepa.php - About 4 hrs to fix

                Method openOverViewModal has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function openOverViewModal($PersonId, $showPersonPanel = true)
                    {
                
                        $tblPerson = Person::useService()->getPersonById($PersonId);
                        if(!$tblPerson){
                Severity: Major
                Found in Application/Api/People/Meta/Support/ApiSupportReadOnly.php - About 4 hrs to fix

                  Method buildPage has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function buildPage(
                          TblPerson $tblPersonDebtor,
                          TblPerson $tblPersonCauser,
                          $TotalPrice
                      ) {
                  Severity: Major
                  Found in Application/Api/Document/Standard/Repository/Billing/Billing.php - About 4 hrs to fix
                    Severity
                    Category
                    Status
                    Source
                    Language