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;
- Read upRead up
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'))
- Read upRead up
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')) {
- Read upRead up
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()));
- Read upRead up
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');
- Read upRead up
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()) {
- Read upRead up
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();
- Read upRead up
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) {
- Read upRead up
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();
- Read upRead up
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) {
- Read upRead up
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
) {
- Read upRead up
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);
- Read upRead up
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))) {
- Read upRead up
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'))
- Read upRead up
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);
- Read upRead up
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];
- Read upRead up
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] )) {
- Read upRead up
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();
- Read upRead up
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;
Avoid too many return
statements within this function. Open
return -1;