Showing 5,014 of 7,620 total issues
Avoid deeply nested control flow statements. Open
if ($tblSchoolTypePrimary) {
$this->updateCertificate($tblCertificate, $tblCertificateTypeYear, $tblSchoolTypePrimary);
if (!$this->getCertificateLevelAllByCertificate($tblCertificate)) {
if (($tblLevel = Division::useService()->getLevelBy($tblSchoolTypePrimary, '3'))) {
$this->createCertificateLevel($tblCertificate, $tblLevel);
Avoid deeply nested control flow statements. Open
if (!$this->getCertificateFieldByCertificateAndField($tblCertificate, $FieldName)) {
$this->createCertificateField($tblCertificate, $FieldName, 500);
}
Avoid deeply nested control flow statements. Open
if ($tblSchoolTypeSecondary) {
$this->updateCertificate($tblCertificate, $tblCertificateTypeYear, $tblSchoolTypeSecondary);
if (!$this->getCertificateLevelAllByCertificate($tblCertificate)) {
if (($tblLevel = Division::useService()->getLevelBy($tblSchoolTypeSecondary, '5'))) {
$this->createCertificateLevel($tblCertificate, $tblLevel);
Avoid deeply nested control flow statements. Open
if ($tblSchoolTypeGym) {
$this->updateCertificate($tblCertificate, $tblCertificateTypeHalfYear,
$tblSchoolTypeGym, null, true);
if (!$this->getCertificateLevelAllByCertificate($tblCertificate)) {
if (($tblLevel = Division::useService()->getLevelBy($tblSchoolTypeGym, '5'))) {
Avoid deeply nested control flow statements. Open
if (!$this->getCertificateFieldByCertificateAndField($tblCertificate, $FieldName)) {
$this->createCertificateField($tblCertificate, $FieldName, 2500);
}
Avoid deeply nested control flow statements. Open
if (!$this->getCertificateLevelAllByCertificate($tblCertificate)) {
if (($tblLevel = Division::useService()->getLevelBy($tblSchoolTypeGym, '10'))) {
$this->createCertificateLevel($tblCertificate, $tblLevel);
}
}
Method getIsNotFulfilledByPerson
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
TblPerson $tblPerson,
TblSubject $tblSubject,
TblSubjectGroup $tblSubjectGroup,
TblDivisionSubject $tblDivisionSubject,
$list,
Avoid deeply nested control flow statements. Open
if (!$this->getCertificateFieldByCertificateAndField($tblCertificate, $FieldName)) {
$this->createCertificateField($tblCertificate, $FieldName, 1000);
}
Avoid deeply nested control flow statements. Open
if (!$this->getCertificateSubjectAll($tblCertificate)) {
$this->setCertificateSubject($tblCertificate, 'DE', 1, 1);
$this->setCertificateSubject($tblCertificate, 'EN', 1, 2);
$this->setCertificateSubject($tblCertificate, 'TSCN', 1, 3, false);
Avoid deeply nested control flow statements. Open
if ($tblSchoolTypePrimary) {
$this->updateCertificate($tblCertificate, $tblCertificateTypeHalfYear, $tblSchoolTypePrimary, null, true);
if (!$this->getCertificateLevelAllByCertificate($tblCertificate)) {
if (($tblLevel = Division::useService()->getLevelBy($tblSchoolTypePrimary, '2'))) {
$this->createCertificateLevel($tblCertificate, $tblLevel);
Function getDivisionSelectStage
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getDivisionSelectStage(
Stage $Stage,
$tblDivisionList,
$BasicRoute = '/Education/ClassRegister/Teacher',
$tblYear = false,
- 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 getDivisionStudentAllByPerson
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getDivisionStudentAllByPerson(TblPerson $tblPerson, $isForced = false)
{
if ($isForced) {
$EntityList = $this->getForceEntityListBy(__METHOD__, $this->getConnection()->getEntityManager(),
- 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 (!$this->getCertificateFieldByCertificateAndField($tblCertificate, $FieldName)) {
$this->createCertificateField($tblCertificate, $FieldName, 1000);
}
Method getIsFulfilledButNotInGroupByPerson
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
TblPerson $tblPerson,
TblSubject $tblSubject,
TblSubjectGroup $tblSubjectGroup,
TblDivisionSubject $tblDivisionSubject,
$list,
Method changeSubjectGroup
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
IFormInterface $Form,
$Group,
$Id,
$DivisionId,
$DivisionSubjectId,
Function updateDivisionSubject
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function updateDivisionSubject(
IFormInterface $Form,
TblDivision $tblDivision,
$Data
) {
- 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
Method addSubjectToDivisionWithGroup
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
IFormInterface $Form,
TblDivision $tblDivision,
TblSubject $tblSubject,
$Group,
$DivisionSubjectId,
Avoid deeply nested control flow statements. Open
if ($this->exitsSubjectStudent($item, $tblPerson)) {
$resultList[$item->getId()] = $item;
}
Avoid deeply nested control flow statements. Open
if (!$SubjectTeacherList && !$tblSubjectTeacherList) {
$TeacherGroupCount++;
}
Avoid deeply nested control flow statements. Open
if ($tblDivision->getServiceTblYear()
&& $tblYear->getId() === $tblDivision->getServiceTblYear()->getId()
) {
$DivisionList[] = $tblDivision;
}