DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function createHoliday has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function createHoliday(IFormInterface $Stage = null, $Data)
    {

        /**
         * Skip to Frontend
Severity: Minor
Found in Application/Education/Lesson/Term/Service.php - About 25 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 frontendSelectPerson has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static function frontendSelectPerson()
    {

        $Stage = new Stage('Notfallzettel', 'Schüler auswählen');

Severity: Minor
Found in Application/Document/Custom/Lebenswelt/Lebenswelt.php - About 25 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 sortDivisionStudentByProperty has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

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

    private function setPersonData(TblPerson $tblPerson, $DataName)
    {
        $result = array();
        $result['Check'] = new CheckBox(
            $DataName.'['.$tblPerson->getId().']',
Severity: Minor
Found in Application/Education/Lesson/Subject/Frontend.php - About 25 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 frontendAccidentReport has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static function frontendAccidentReport()
    {

        $Stage = new Stage('Schulbescheinigung', 'Schüler auswählen');

Severity: Minor
Found in Application/Document/Standard/EnrollmentDocument/EnrollmentDocument.php - About 25 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 isOrientation has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function isOrientation(TblSubject $tblSubject)
    {
        if (($tblSubjectOrientationAll = $this->getSubjectOrientationAll())) {
            foreach ($tblSubjectOrientationAll as $tblSubjectOrientation) {
                if ($tblSubjectOrientation->getId() == $tblSubject->getId()) {
Severity: Minor
Found in Application/Education/Lesson/Subject/Service.php - About 25 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 frontendSelectPerson has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static function frontendSelectPerson()
    {

        $Stage = new Stage('Schülerkartei', 'Schüler auswählen');
        $Stage->addButton(new Standard('Einstellungen', '/Document/Standard/StudentCard/Setting', new CogWheels(),
Severity: Minor
Found in Application/Document/Standard/StudentCard/Frontend.php - About 25 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 getServiceTblSubject has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function getServiceTblSubject()
    {

        if (null === $this->serviceTblSubject) {
            return false;
Severity: Minor
Found in Application/Document/Generator/Service/Entity/TblDocumentSubject.php - About 25 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 getSubjectForeignLanguageAll has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function getSubjectForeignLanguageAll()
    {

        $tblSubjectList = array();
        $tblGroup = $this->getGroupByIdentifier('STANDARD');
Severity: Minor
Found in Application/Education/Lesson/Subject/Service.php - About 25 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 initKeys has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function initKeys($table) {
        try {
            $sql_keys = DB::conn()->fetchAll("SHOW INDEX FROM `$table`");
            if (is_array($sql_keys) && count($sql_keys)) {
                foreach ($sql_keys as $sql_key) {
Severity: Minor
Found in xplain/app/Row.php - About 25 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 getPrimaryKey has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function getPrimaryKey() {
        if (is_array($this->_keys)) {
            foreach ($this->_keys as $key) {
                if ($key->isPrimary()) return $key;
            }
Severity: Minor
Found in xplain/app/Row.php - About 25 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 getPrimaryKey has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function getPrimaryKey() {
        if (is_array($this->_keys)) {
            foreach($this->_keys as $key) {
                if ($key->isPrimary()) return $key;
            }
Severity: Minor
Found in xplain/app/Row.class.php - About 25 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 setSearch has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private function setSearch()
    {

        $List = $this->getTableSearch();
        if (!empty( $List )) {
Severity: Minor
Found in System/Extension/Repository/DataTables.php - About 25 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 createServiceKey has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    final protected function createServiceKey(Table $Table, $ServiceTable)
    {

        if( $ServiceTable instanceof AbstractEntity || $ServiceTable instanceof Element ) {
            $Name = $ServiceTable->getEntityShortName();
Severity: Minor
Found in System/Database/Binding/AbstractSetup.php - About 25 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

Severity
Category
Status
Source
Language