Showing 5,014 of 7,620 total issues
Function isBeforeEditPeriod
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function isBeforeEditPeriod()
{
if ($this->getFromDate()){
$fromDate = $this->FromDate;
- 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 setTableTask
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function setTableTask(Schema &$Schema, Table $tblTestType)
{
$Table = $this->getConnection()->createTable($Schema, 'tblTask');
if (!$this->getConnection()->hasColumn('tblTask', 'Name')) {
- 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 deeply nested control flow statements. Open
if ($tblStudentSubject->getTblStudentSubjectRanking()->getId() == $Rank) {
$Global = $this->getGlobal();
if ($tblStudentSubject->getServiceTblLevelFrom()) {
$Global->POST['Meta']['SubjectLevelFrom'][$tblStudentSubjectType->getId()][$tblStudentSubjectRanking->getId()]
= $tblStudentSubject->getServiceTblLevelFrom()->getId();
Avoid deeply nested control flow statements. Open
if ($tblDivision) {
$behaviorTaskAddList[] = array(
'tblTask' => $tblTask,
'tblDivision' => $tblDivision,
'tblGradeType' => $tblGradeType
Avoid deeply nested control flow statements. Open
if ($tblPersonListMain) {
foreach ($tblPersonListMain as $tblPerson) {
$TeacherAcronym = new ToolTip(new Small(new NotAvailable())
,
'Lehrer ' . $tblPerson->getLastFirstName() . ' besitzt kein Lehrerkürzel');
Avoid deeply nested control flow statements. Open
if ($tblCommonBirthDates) {
if ($tblCommonBirthDates->getBirthday() != '') {
$BirthDay = $tblCommonBirthDates->getBirthday();
}
}
Avoid deeply nested control flow statements. Open
if ($tblTeacher) {
$TeacherString .= new Bold($tblTeacher->getAcronym().' ');
}
Avoid deeply nested control flow statements. Open
if (($tblSubjectStudent->getServiceTblPerson())) {
$countPersons++;
}
Function setYearAndDivisionForMassReplace
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function setYearAndDivisionForMassReplace(TblPerson $tblPerson, &$Year, &$Division)
{
$Year[ViewYear::TBL_YEAR_ID] = '';
$Division[ViewDivisionStudent::TBL_LEVEL_ID] = '';
$Division[ViewDivisionStudent::TBL_DIVISION_NAME] = '';
- 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 deeply nested control flow statements. Open
if ($tblYear
&& $tblYearItem->getId() != $tblYear->getId()
) {
continue;
}
Avoid deeply nested control flow statements. Open
if (isset($grades[$personId][$gradeTypeId]) && $grades[$personId][$gradeTypeId]['Count'] > 0) {
$studentList[$tblDivision->getId()][$personId]['Type' . $gradeTypeId] =
new Bold('Ø ' .
round(floatval($grades[$personId][$gradeTypeId]['Sum']) / floatval($grades[$personId][$gradeTypeId]['Count']),
2) . ' | ') . $studentListByDivision['Type' . $gradeTypeId];
Avoid deeply nested control flow statements. Open
if ($showProposalBehaviorGrade) {
$proposalGrade = new Warning(new Bold('f'));
if (($tblProposalBehaviorGrade = Gradebook::useService()->getProposalBehaviorGrade(
$tblDivision, $tblTask, $tblGradeType, $tblPerson
)) && $tblProposalBehaviorGrade->getDisplayGrade() !== ''
Method createGradeType
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$Name,
$Code,
$Description,
$IsHighlighted,
TblTestType $tblTestType,
Avoid deeply nested control flow statements. Open
if ($tblDivisionStudentAll) {
foreach ($tblDivisionStudentAll as $tblPerson) {
if ($this->checkIsPersonInActive($tblDivision, $tblPerson, $taskDate)) {
continue;
}
Function getDateForSorter
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getDateForSorter()
{
if (($tblTest = $this->getServiceTblTest())) {
if ($tblTest->isContinues()) {
- 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 deeply nested control flow statements. Open
if ($tblGrade) {
if (!$tblTestTemp->isContinues() // Testdatum
|| ($tblTestTemp->isContinues() // Notendatum
&& $tblGrade->getDate() && $tblTask->getDate()
&& ($taskDate = new \DateTime($tblTask->getDate()))
Avoid deeply nested control flow statements. Open
if ($posStart !== false) {
$average = substr($average, 0, $posStart);
}
Avoid deeply nested control flow statements. Open
if ($tblPerson) {
if ($this->checkIsPersonInActive($tblDivision, $tblPerson, $taskDate)) {
continue;
}
Method getGradesByStudent
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
TblPerson $tblPerson,
TblDivision $tblDivision,
TblSubject $tblSubject,
TblTestType $tblTestType,
TblPeriod $tblPeriod = null,
Function getGradesByStudent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getGradesByStudent(
TblPerson $tblPerson,
TblDivision $tblDivision,
TblSubject $tblSubject,
TblTestType $tblTestType,
- 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"