DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

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

    public function copyTeacherAllByDivision(TblDivision $tblDivision, TblDivision $tblDivisionCopy)
    {

        $Manager = $this->getConnection()->getEntityManager();
        $EntityList = $this->getConnection()->getEntityManager()->getEntity('TblDivisionTeacher')->findBy(array(
Severity: Minor
Found in Application/Education/Lesson/Division/Service/Data.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 getCustodyAllByDivision has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function getCustodyAllByDivision(TblDivision $tblDivision)
    {

        $TempList = $this->getCachedEntityListBy(__Method__, $this->getConnection()->getEntityManager(),
            'TblDivisionCustody',
Severity: Minor
Found in Application/Education/Lesson/Division/Service/Data.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 getDivisionTeacherAllByTeacher has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function getDivisionTeacherAllByTeacher(TblPerson $tblPerson)
    {

        $EntityList = $this->getCachedEntityListBy(__METHOD__, $this->getConnection()->getEntityManager(),
            'TblDivisionTeacher',
Severity: Minor
Found in Application/Education/Lesson/Division/Service/Data.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 getPersonAllByDivisionList has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function getPersonAllByDivisionList($tblDivisionList)
    {

        $tblPersonList = array();
        if (!empty($tblDivisionList)) {
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 destroyLevel has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public
    function destroyLevel(
        TblLevel $tblLevel
    ) {

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

    public function getSubjectProfileAll()
    {

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

    public function getSearchGui($Setup)
    {

        // Sanitize Title
        if (empty( $this->Title )) {
Severity: Minor
Found in System/Database/Filter/Criteria/AbstractCriteria.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 setMigration has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function setMigration(DBALSchema &$Schema, $Simulate = true)
    {

        $Statement = $this->Database->getSchema()->getMigrateToSql($Schema,
            $this->Database->getPlatform()
Severity: Minor
Found in System/Database/Fitting/Structure.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 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

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 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

Severity
Category
Status
Source
Language