DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function getDivisionStudentSortOrderMax has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function getDivisionStudentSortOrderMax(TblDivision $tblDivision)
    {

        $list = $this->getDivisionStudentAllByDivision($tblDivision, true);
        $max = 0;
Severity: Minor
Found in Application/Education/Lesson/Division/Service/Data.php - About 35 mins 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 getTblSubjectElectivesByPerson has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private function getTblSubjectElectivesByPerson(TblPerson $tblPerson)
    {
        $result = array();
        if (($tblStudent = $tblPerson->getStudent())
            && ($tblStudentSubjectType = Student::useService()->getStudentSubjectTypeByIdentifier('ELECTIVE'))
Severity: Minor
Found in Application/Education/Lesson/Division/Filter/Filter.php - About 35 mins 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 setTableAbsence has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private function setTableAbsence(Schema &$Schema)
    {

        $Table = $this->getConnection()->createTable($Schema, 'tblAbsence');
        if (!$this->getConnection()->hasColumn('tblAbsence', 'serviceTblPerson')) {
Severity: Minor
Found in Application/Education/ClassRegister/Absence/Service/Setup.php - About 35 mins 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 countDivisionCustodyAllByDivision has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function countDivisionCustodyAllByDivision(TblDivision $tblDivision)
    {
        // Todo GCK getCachedCountBy anpassen --> ignorieren von removed entities bei Verkn�pfungstabelle
//        $result = $this->getCachedCountBy(__METHOD__, $this->getConnection()->getEntityManager(), 'TblDivisionCustody',
//            array(TblDivisionCustody::ATTR_TBL_DIVISION => $tblDivision->getId()));
Severity: Minor
Found in Application/Education/Lesson/Division/Service/Data.php - About 35 mins 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 frontendDivisionTeacher has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

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

        $Stage = new Stage('Klassenbuch', 'Auswählen');

Severity: Minor
Found in Application/Education/ClassRegister/ClassRegister.php - About 35 mins 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 isElective has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function isElective(TblSubject $tblSubject)
    {
        if (($tblSubjectElectiveAll = $this->getSubjectElectiveAll())) {
            foreach ($tblSubjectElectiveAll as $tblSubjectElective) {
                if ($tblSubjectElective && $tblSubjectElective->getId() == $tblSubject->getId()) {
Severity: Minor
Found in Application/Education/Lesson/Subject/Service.php - About 35 mins 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 getDivisionAllByYearAndType has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function getDivisionAllByYearAndType(TblYear $tblYear, TblType $tblType)
    {

        $result = array();

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

    public function removeStudentToDivision(TblDivision $tblDivision, TblPerson $tblPerson, $IsSoftRemove = false)
    {

        $tblStudentSubjectList = (new Data($this->getBinding()))->getSubjectStudentByPerson($tblPerson);
        if ($tblStudentSubjectList) {
Severity: Minor
Found in Application/Education/Lesson/Division/Service.php - About 35 mins 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 addAllAvailableStudentsToSubjectGroup has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function addAllAvailableStudentsToSubjectGroup(TblDivisionSubject $tblDivisionSubject)
    {

        $filter = new Filter($tblDivisionSubject);
        $filter->load();
Severity: Minor
Found in Application/Education/Lesson/Division/Service.php - About 35 mins 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 getSubjectGroupByNameAndDivisionAndSubject has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function getSubjectGroupByNameAndDivisionAndSubject($Name, TblDivision $tblDivision, TblSubject $tblSubject)
    {

        $tblDivisionSubjectList = Division::useService()->getDivisionSubjectAllWhereSubjectGroupByDivisionAndSubject($tblDivision, $tblSubject);
        if ($tblDivisionSubjectList) {
Severity: Minor
Found in Application/Education/Lesson/Division/Service.php - About 35 mins 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 hasRepeaters has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private static function hasRepeaters(
        TblPerson $tblPerson,
        TblLevel $tblLevel,
        TblDivision $tblDivision
    ) {
Severity: Minor
Found in Application/Document/Generator/Service/Kamenz/KamenzReportService.php - About 35 mins 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 prepareEntity has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    final private function prepareEntity( $Entity, $updateLifeCycle = false ) {

        if( !$this->EntityManager->contains( $Entity ) ) {
            /** @var Element $Entity */
            $Entity = $this->EntityManager->merge($Entity);
Severity: Minor
Found in System/Database/Fitting/Manager.php - About 35 mins 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 getSchoolTypeListForStudentCard has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function getSchoolTypeListForStudentCard(TblPerson $tblPerson)
    {

        $list = array();
        if (($tblDivisionStudentList = Division::useService()->getDivisionStudentAllByPerson($tblPerson))) {
Severity: Minor
Found in Application/Document/Generator/Service.php - About 35 mins 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 getForeignLanguages has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private static function getForeignLanguages(TblPerson $tblPerson)
    {
        $subjects = array();
        if (($tblStudent = $tblPerson->getStudent())
            && ($tblStudentSubjectType = Student::useService()->getStudentSubjectTypeByIdentifier('FOREIGN_LANGUAGE'))
Severity: Minor
Found in Application/Document/Generator/Service/Kamenz/KamenzReportService.php - About 35 mins 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 getHostIpAddress has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private function getHostIpAddress($Host)
    {

        if (false === filter_var($Host, FILTER_VALIDATE_IP)) {
            $Address = gethostbyname($Host);
Severity: Minor
Found in System/Token/Type/YubiKey.php - About 35 mins 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 convertByte2Integer has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private function convertByte2Integer($Byte)
    {

        preg_match('/^\s*([0-9.]+)\s*([KMGTPE])B?\s*$/i', $Byte, $Match);
        $Value = (float)$Match[1];
Severity: Minor
Found in System/Cache/Handler/MemoryHandler.php - About 35 mins 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 getContainer has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private function getContainer($Region, $Key)
    {

        if (isset( $this->MemoryRegister[$Region] )) {
            if (isset( $this->MemoryRegister[$Region][$Key] )) {
Severity: Minor
Found in System/Cache/Handler/MemoryHandler.php - About 35 mins 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 getTableOrderBy has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private function getTableOrderBy()
    {

        if (isset( $this->Request['order'] )) {
            $OrderBy = array();
Severity: Minor
Found in System/Extension/Repository/DataTables.php - About 35 mins 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

Avoid too many return statements within this function.
Open

                            return 1;
Severity: Major
Found in Common/Script/ModCompleter.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                                return -1;
    Severity: Major
    Found in Common/Script/ModCompleter.js - About 30 mins to fix
      Severity
      Category
      Status
      Source
      Language