File Service.php
has 3341 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Created by PhpStorm.
* User: Kauschke
* Date: 12.07.2016
Function createCertificateContent
has a Cognitive Complexity of 434 (exceeds 5 allowed). Consider refactoring. Open
private function createCertificateContent(
TblPrepareCertificate $tblPrepare = null,
TblLeaveStudent $tblLeaveStudent = null,
TblPerson $tblPerson,
$Content = 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
Method createCertificateContent
has 689 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function createCertificateContent(
TblPrepareCertificate $tblPrepare = null,
TblLeaveStudent $tblLeaveStudent = null,
TblPerson $tblPerson,
$Content = array()
Function checkCertificateSubjectsForStudents
has a Cognitive Complexity of 145 (exceeds 5 allowed). Consider refactoring. Open
public function checkCertificateSubjectsForStudents(TblPrepareCertificate $tblPrepare)
{
$subjectList = array();
$resultList = 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
Service
has 97 functions (exceeds 20 allowed). Consider refactoring. Open
class Service extends AbstractService
{
/**
* @param bool $doSimulation
Function updateAbiturPreliminaryGrades
has a Cognitive Complexity of 92 (exceeds 5 allowed). Consider refactoring. Open
public function updateAbiturPreliminaryGrades(
IFormInterface $Form = null,
TblPerson $tblPerson,
TblPrepareCertificate $tblPrepare,
$GroupId = null,
- 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 updateAbiturExamGrades
has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring. Open
public function updateAbiturExamGrades(
IFormInterface $form,
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson,
$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
Function updatePrepareExamGrades
has a Cognitive Complexity of 76 (exceeds 5 allowed). Consider refactoring. Open
public function updatePrepareExamGrades(
IFormInterface $form,
TblPrepareCertificate $tblPrepare,
TblSubject $tblCurrentSubject,
TblSubject $tblNextSubject = null,
- 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 checkCertificateSubjectsForDivision
has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring. Open
public function checkCertificateSubjectsForDivision(TblPrepareCertificate $tblPrepare, $certificateNameList, &$hasMissingLanguage)
{
if (($tblSetting = ConsumerSetting::useService()->getSetting('Api', 'Education', 'Certificate', 'ProfileAcronym'))
&& ($value = $tblSetting->getValue())
- 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 calcSubjectGradesAverageOthers
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
private function calcSubjectGradesAverageOthers(TblPrepareStudent $tblPrepareStudent)
{
if (($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())
&& ($tblPrepare = $tblPrepareStudent->getTblPrepareCertificate())
- 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 copyAbiturPreliminaryGradesFromAppointedDateTask
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
public function copyAbiturPreliminaryGradesFromAppointedDateTask(
TblDivision $tblDivision,
TblPerson $tblPerson,
TblPrepareCertificate $tblPrepareCertificate,
TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
- 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 calcSubjectGradesAverage
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
private function calcSubjectGradesAverage(TblPrepareStudent $tblPrepareStudent)
{
if (($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())
&& ($tblPrepare = $tblPrepareStudent->getTblPrepareCertificate())
- 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 setAutoDroppedSubjects
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
public function setAutoDroppedSubjects(TblPrepareCertificate $tblPrepare, TblPerson $tblPerson)
{
$gradeString = '';
$tblLastDivision = 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 getAutoDroppedSubjects
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
public function getAutoDroppedSubjects(TblPerson $tblPerson, TblDivision $tblCurrentDivision)
{
$subjectList = array();
$tblLastDivision = 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 updatePrepareInformationList
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
public function updatePrepareInformationList(
IFormInterface $Stage = null,
TblPrepareCertificate $tblPrepare,
TblGroup $tblGroup = null,
$Route,
- 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 getCoursesForStudent
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
public function getCoursesForStudent(TblDivision $tblDivision, TblPerson $tblPerson)
{
$advancedCourses = array();
$basicCourses = 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 updateLeaveContent
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
public function updateLeaveContent(
IFormInterface $Form = null,
TblPerson $tblPerson,
TblDivision $tblDivision,
TblCertificate $tblCertificate,
- 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 updateLeaveStudentAbiturPoints
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function updateLeaveStudentAbiturPoints(
IFormInterface $Form = null,
TblLeaveStudent $tblLeaveStudent,
$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
Function updatePrepareBehaviorGrades
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function updatePrepareBehaviorGrades(
IFormInterface $Stage = null,
TblPrepareCertificate $tblPrepare,
TblGroup $tblGroup = null,
TblGradeType $tblGradeType,
- 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 updateAbiturExamGrades
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateAbiturExamGrades(
IFormInterface $form,
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson,
$Data,
Function getResultForAbiturAverageGrade
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function getResultForAbiturAverageGrade(
$totalPoints
) {
// ist Formel korrekt?
- 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 updateAbiturLevelTenGrades
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function updateAbiturLevelTenGrades(
IFormInterface $form,
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson,
$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 checkCertificateSubjectsForStudents
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function checkCertificateSubjectsForStudents(TblPrepareCertificate $tblPrepare)
{
$subjectList = array();
$resultList = array();
Function updatePrepareSetSigner
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function updatePrepareSetSigner(
IFormInterface $Stage,
TblPrepareCertificate $tblPrepare,
TblGroup $tblGroup = null,
$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
Function getResultForAbiturBlockII
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public function getResultForAbiturBlockII(
TblPrepareCertificate $tblPrepareCertificate,
TblPerson $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 getCertificateMultiContent
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function getCertificateMultiContent(TblPrepareCertificate $tblPrepare, TblGroup $tblGroup = null)
{
$Content = 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
Method updatePrepareExamGrades
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updatePrepareExamGrades(
IFormInterface $form,
TblPrepareCertificate $tblPrepare,
TblSubject $tblCurrentSubject,
TblSubject $tblNextSubject = null,
Consider simplifying this complex logical expression. Open
if ($tblConsumer
&& $tblConsumer->getAcronym() == 'EVSR'
&& $isDivisionTeacherAvailable
) {
$firstName = $tblPersonSigner->getFirstName();
Method updateAbiturPreliminaryGrades
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateAbiturPreliminaryGrades(
IFormInterface $Form = null,
TblPerson $tblPerson,
TblPrepareCertificate $tblPrepare,
$GroupId = null,
Method setAutoDroppedSubjects
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setAutoDroppedSubjects(TblPrepareCertificate $tblPrepare, TblPerson $tblPerson)
{
$gradeString = '';
$tblLastDivision = false;
Function getResultForAbiturBlockI
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function getResultForAbiturBlockI(
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson
) {
$countCourses = 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
Method updatePrepareInformationList
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updatePrepareInformationList(
IFormInterface $Stage = null,
TblPrepareCertificate $tblPrepare,
TblGroup $tblGroup = null,
$Route,
Function copyAbiturPreliminaryGradesFromCertificates
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function copyAbiturPreliminaryGradesFromCertificates(
TblPrepareStudent $tblPrepareStudent,
TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
TblPrepareCertificate $tblPrepareCertificate
) {
- 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 updateAbiturLevelTenGrades
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateAbiturLevelTenGrades(
IFormInterface $form,
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson,
$Data,
Method getAutoDroppedSubjects
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getAutoDroppedSubjects(TblPerson $tblPerson, TblDivision $tblCurrentDivision)
{
$subjectList = array();
$tblLastDivision = false;
Method updatePrepareBehaviorGrades
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updatePrepareBehaviorGrades(
IFormInterface $Stage = null,
TblPrepareCertificate $tblPrepare,
TblGroup $tblGroup = null,
TblGradeType $tblGradeType,
Method getResultForAbiturBlockII
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getResultForAbiturBlockII(
TblPrepareCertificate $tblPrepareCertificate,
TblPerson $tblPerson
) {
Method getResultForAbiturAverageGrade
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getResultForAbiturAverageGrade(
$totalPoints
) {
// ist Formel korrekt?
Function checkAbiturExams
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function checkAbiturExams(TblPrepareCertificate $tblPrepareCertificate, TblPerson $tblPerson)
{
$warnings = false;
$exams = 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 setYearGroupButtonList
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function setYearGroupButtonList($Route, $IsAllYears, $IsGroup, $YearId, &$tblYear, $HasAllYears = true)
{
$tblYear = false;
$tblYearList = Term::useService()->getYearByNow();
- 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 checkCertificateSubjectsForDivision
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function checkCertificateSubjectsForDivision(TblPrepareCertificate $tblPrepare, $certificateNameList, &$hasMissingLanguage)
{
if (($tblSetting = ConsumerSetting::useService()->getSetting('Api', 'Education', 'Certificate', 'ProfileAcronym'))
&& ($value = $tblSetting->getValue())
Method updateLeaveStudentAbiturPoints
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateLeaveStudentAbiturPoints(
IFormInterface $Form = null,
TblLeaveStudent $tblLeaveStudent,
$Data
) {
Method updateAbiturPrepareInformation
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateAbiturPrepareInformation(
IFormInterface $form,
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson,
$Data,
Function updateAbiturPrepareInformation
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function updateAbiturPrepareInformation(
IFormInterface $form,
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson,
$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 calcSubjectGradesAverageOthers
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function calcSubjectGradesAverageOthers(TblPrepareStudent $tblPrepareStudent)
{
if (($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())
&& ($tblPrepare = $tblPrepareStudent->getTblPrepareCertificate())
Function copyAbiturLeaveGradesFromCertificates
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function copyAbiturLeaveGradesFromCertificates(
TblPrepareStudent $tblPrepareStudent,
TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
TblLeaveStudent $tblLeaveStudent
) {
- 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 getAbiturLeaveGradeBySubject
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function getAbiturLeaveGradeBySubject($points)
{
if ($points === '15') {
return '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
Method updateLeaveContent
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateLeaveContent(
IFormInterface $Form = null,
TblPerson $tblPerson,
TblDivision $tblDivision,
TblCertificate $tblCertificate,
Method updatePrepareSetSigner
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updatePrepareSetSigner(
IFormInterface $Stage,
TblPrepareCertificate $tblPrepare,
TblGroup $tblGroup = null,
$Data,
Function getGenderByPerson
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function getGenderByPerson(TblPerson $tblPerson)
{
$return = false;
if (($tblCommonTeacher = $tblPerson->getCommon())) {
- 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 createPrepareAdditionalGradeForm
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createPrepareAdditionalGradeForm(
IFormInterface $Form,
$Data,
TblPrepareCertificate $tblPrepareCertificate,
TblGroup $tblGroup = null,
Method calcSubjectGradesAverage
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function calcSubjectGradesAverage(TblPrepareStudent $tblPrepareStudent)
{
if (($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())
&& ($tblPrepare = $tblPrepareStudent->getTblPrepareCertificate())
Method copyAbiturPreliminaryGradesFromAppointedDateTask
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function copyAbiturPreliminaryGradesFromAppointedDateTask(
TblDivision $tblDivision,
TblPerson $tblPerson,
TblPrepareCertificate $tblPrepareCertificate,
TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
Consider simplifying this complex logical expression. Open
if (($tblCertificateType = $tblGenerateCertificate->getServiceTblCertificateType())
&& $tblCertificateType->getIdentifier() == 'DIPLOMA'
&& ($tblSetting = ConsumerSetting::useService()->getSetting(
'Education', 'Certificate', 'Prepare', 'IsGradeVerbalOnDiploma'))
&& $tblSetting->getValue()
Method checkAbiturExams
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function checkAbiturExams(TblPrepareCertificate $tblPrepareCertificate, TblPerson $tblPerson)
{
$warnings = false;
$exams = array();
Function updatePrepareInformationDataList
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function updatePrepareInformationDataList(
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson,
$Content,
Certificate $Certificate = null
- 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 calcAbiturLeaveGradePointsBySubject
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function calcAbiturLeaveGradePointsBySubject(TblLeaveStudent $tblLeaveStudent, TblSubject $tblSubject)
{
$sum = 0;
$count = 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
Method setYearGroupButtonList
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setYearGroupButtonList($Route, $IsAllYears, $IsGroup, $YearId, &$tblYear, $HasAllYears = true)
{
$tblYear = false;
$tblYearList = Term::useService()->getYearByNow();
Method updateAbiturLeaveInformation
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateAbiturLeaveInformation(
IFormInterface $form = null,
TblLeaveStudent $tblLeaveStudent,
$Data
) {
Method getResultForAbiturBlockI
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getResultForAbiturBlockI(
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson
) {
$countCourses = 0;
Function createPrepareAdditionalGradeForm
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function createPrepareAdditionalGradeForm(
IFormInterface $Form,
$Data,
TblPrepareCertificate $tblPrepareCertificate,
TblGroup $tblGroup = null,
- 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 updateAbiturLeaveInformation
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function updateAbiturLeaveInformation(
IFormInterface $form = null,
TblLeaveStudent $tblLeaveStudent,
$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 getAbiturLeaveGradeBySubject
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getAbiturLeaveGradeBySubject($points)
{
if ($points === '15') {
return '1+';
Method copyAbiturPreliminaryGradesFromCertificates
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function copyAbiturPreliminaryGradesFromCertificates(
TblPrepareStudent $tblPrepareStudent,
TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
TblPrepareCertificate $tblPrepareCertificate
) {
Method copyAbiturLeaveGradesFromCertificates
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function copyAbiturLeaveGradesFromCertificates(
TblPrepareStudent $tblPrepareStudent,
TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
TblLeaveStudent $tblLeaveStudent
) {
Consider simplifying this complex logical expression. Open
if ($tblPrepare
&& ($tblAppointedDateTask = $tblPrepare->getServiceTblAppointedDateTask())
&& $tblYear
&& ($tblPeriodList = $tblYear->getTblPeriodAll($tblLevel && $tblLevel->getName() == '12'))
&& ($tblPeriod = $tblAppointedDateTask->getServiceTblPeriodByDivision($tblDivision))
Method getCoursesForStudent
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getCoursesForStudent(TblDivision $tblDivision, TblPerson $tblPerson)
{
$advancedCourses = array();
$basicCourses = array();
Method getCertificateMultiContent
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getCertificateMultiContent(TblPrepareCertificate $tblPrepare, TblGroup $tblGroup = null)
{
$Content = array();
Consider simplifying this complex logical expression. Open
if (($tblConsumer = Consumer::useService()->getConsumerBySession())
&& $tblConsumer->getAcronym() == 'EVSR'
&& $tblGenerateCertificate
&& ($tblCertificateType = $tblGenerateCertificate->getServiceTblCertificateType())
&& $tblCertificateType->getIdentifier() != 'RECOMMENDATION'
Method updatePrepareExamGrades
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
IFormInterface $form,
TblPrepareCertificate $tblPrepare,
TblSubject $tblCurrentSubject,
TblSubject $tblNextSubject = null,
$IsFinalGrade = null,
Method createPrepareAdditionalGrade
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
TblPrepareCertificate $tblPrepareCertificate,
TblPerson $tblPerson,
TblSubject $tblSubject,
TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
$ranking,
Function setSignerFromSignedInPerson
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function setSignerFromSignedInPerson(TblPrepareStudent $tblPrepareStudent)
{
if (!$tblPrepareStudent->getServiceTblPersonSigner()
&& ($tblPrepare = $tblPrepareStudent->getTblPrepareCertificate())
- 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 createPrepareData
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
TblDivision $tblDivision,
$Date,
$Name,
$IsGradeInformation = false,
TblGenerateCertificate $tblGenerateCertificate = null,
Method updateAbiturExamGrades
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
IFormInterface $form,
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson,
$Data,
$GroupId,
Method updatePrepareBehaviorGrades
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
IFormInterface $Stage = null,
TblPrepareCertificate $tblPrepare,
TblGroup $tblGroup = null,
TblGradeType $tblGradeType,
TblGradeType $tblNextGradeType = null,
Avoid deeply nested control flow statements. Open
if ($tblGrade->getGrade() !== null && $tblGrade->getGrade() !== '') {
if ($tblSubject->getAcronym() == 'EN2') {
$tblSubject = Subject::useService()->getSubjectByAcronym('EN');
}
Method updatePrepareData
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
TblPrepareCertificate $tblPrepare,
$Date,
$Name,
TblTask $tblAppointedDateTask = null,
TblTask $tblBehaviorTask = null,
Method createPrepareAdditionalGradeForm
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
IFormInterface $Form,
$Data,
TblPrepareCertificate $tblPrepareCertificate,
TblGroup $tblGroup = null,
TblPerson $tblPerson,
Avoid deeply nested control flow statements. Open
if ($tblSubject->getAcronym() == 'EN2') {
$tblSubject = Subject::useService()->getSubjectByAcronym('EN');
}
Method updateAbiturPreliminaryGrades
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
IFormInterface $Form = null,
TblPerson $tblPerson,
TblPrepareCertificate $tblPrepare,
$GroupId = null,
$View = null,
Avoid deeply nested control flow statements. Open
if (!$tblCertificateSubject
&& $tblPrepareGrade && $tblPrepareGrade->getGrade() != ''
) {
$grade = str_replace('+', '', $tblPrepareGrade->getGrade());
$grade = str_replace('-', '', $grade);
Avoid deeply nested control flow statements. Open
if ($tblTestList) {
foreach ($tblTestList as $tblTest) {
$tblPrepareGrade = Gradebook::useService()->getGradeByTestAndStudent($tblTest,
$tblPerson);
if ($tblPrepareGrade) {
Method setYearGroupButtonList
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function setYearGroupButtonList($Route, $IsAllYears, $IsGroup, $YearId, &$tblYear, $HasAllYears = true)
Avoid deeply nested control flow statements. Open
if (is_numeric($grade)) {
$gradeList[] = $grade;
}
Method updatePrepareInformationList
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
IFormInterface $Stage = null,
TblPrepareCertificate $tblPrepare,
TblGroup $tblGroup = null,
$Route,
$Data,
Avoid deeply nested control flow statements. Open
if ($tblSubject) {
if ($tblSubjectGroup->isAdvancedCourse()) {
$advancedCourses[$tblSubject->getId()] = $tblSubject;
} else {
$basicCourses[$tblSubject->getId()] = $tblSubject;
Method updatePrepareGradeForBehavior
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson,
TblDivision $tblDivision,
TblTestType $tblTestType,
TblGradeType $tblGradeType,
Avoid deeply nested control flow statements. Open
if (($tblSubject = $tblPrepareAdditionalGrade->getServiceTblSubject())) {
if (isset($Data[$midTerm][$tblSubject->getId()])) {
if (!$tblPrepareAdditionalGrade->isSelected()) {
(new Data($this->getBinding()))->updatePrepareAdditionalGrade(
$tblPrepareAdditionalGrade, $tblPrepareAdditionalGrade->getGrade(), true);
Avoid deeply nested control flow statements. Open
if ($tblCourse->getName() == 'Hauptschule') {
$Content['P' . $personId]['Student']['Course']['Degree'] = 'Hauptschulabschlusses';
$Content['P' . $personId]['Student']['Course']['Name'] = 'Hauptschulbildungsgang';
} elseif ($tblCourse->getName() == 'Realschule') {
$Content['P' . $personId]['Student']['Course']['Degree'] = 'Realschulabschlusses';
Avoid deeply nested control flow statements. Open
if (!$tblCertificateSubject
&& $tblGrade && $tblGrade->getGrade() != ''
) {
$grade = str_replace('+', '', $tblGrade->getGrade());
$grade = str_replace('-', '', $grade);
Consider simplifying this complex logical expression. Open
if ($tblLastDivision
&& $tblCurrentDivision
&& ($tblLastYear = $tblLastDivision->getServiceTblYear())
&& ($tblCurrentYear = $tblCurrentDivision->getServiceTblYear())
&& ($tblLastDivisionSubjectList = Division::useService()->getDivisionSubjectAllByPersonAndYear($tblPerson,
Consider simplifying this complex logical expression. Open
if (($tblConsumer = Consumer::useService()->getConsumerBySession())
&& $tblConsumer->getAcronym() == 'EVSR'
&& ($tblCertificateType = $tblGenerateCertificate->getServiceTblCertificateType())
&& $tblCertificateType->getIdentifier() != 'RECOMMENDATION'
&& ($tblSetting = ConsumerSetting::useService()->getSetting(
Method updateLeaveContent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
IFormInterface $Form = null,
TblPerson $tblPerson,
TblDivision $tblDivision,
TblCertificate $tblCertificate,
$Data
Method getPrepareGradeBySubject
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson,
TblDivision $tblDivision,
TblSubject $tblSubject,
TblTestType $tblTestType
Method createLeaveStudent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
TblPerson $tblPerson,
TblDivision $tblDivision,
TblCertificate $tblCertificate,
$IsApproved = false,
$IsPrinted = false
Method updatePrepareSetSigner
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
IFormInterface $Stage,
TblPrepareCertificate $tblPrepare,
TblGroup $tblGroup = null,
$Data,
$Route
Method updateAbiturLevelTenGrades
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
IFormInterface $form,
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson,
$Data,
$GroupId
Method getPrepareGradeByGradeType
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson,
TblDivision $tblDivision,
TblTestType $tblTestType,
TblGradeType $tblGradeType
Method updateAbiturPrepareInformation
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
IFormInterface $form,
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson,
$Data,
$GroupId
Method copyAbiturPreliminaryGradesFromAppointedDateTask
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
TblDivision $tblDivision,
TblPerson $tblPerson,
TblPrepareCertificate $tblPrepareCertificate,
TblPrepareAdditionalGradeType $tblPrepareAdditionalGradeType,
TblTestType $tblTestType
Function getPrepareAllByYear
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getPrepareAllByYear(TblYear $tblYear)
{
$resultList = array();
$entityList = $this->getPrepareAll();
- 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 getVerbalGrade
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function getVerbalGrade($grade)
{
switch ($grade) {
case 1 : return 'sehr gut'; break;
case 2 : return 'gut'; break;
- 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 method. Open
case 5 : return 'mangelhaft'; break;
Avoid too many return
statements within this method. Open
return '2,6';
Avoid too many return
statements within this method. Open
return '2,3';
Avoid too many return
statements within this method. Open
return $grade;
Avoid too many return
statements within this method. Open
return '2,2';
Avoid too many return
statements within this method. Open
return '2,5';
Avoid too many return
statements within this method. Open
return '1,7';
Avoid too many return
statements within this method. Open
return '2,0';
Avoid too many return
statements within this method. Open
case 6 : return 'ungenügend'; break;
Avoid too many return
statements within this method. Open
return '1,6';
Avoid too many return
statements within this method. Open
return '2,1';
Avoid too many return
statements within this method. Open
return '1,5';
Avoid too many return
statements within this method. Open
return '1,4';
Avoid too many return
statements within this method. Open
return '1,8';
Avoid too many return
statements within this method. Open
return '1,9';
Avoid too many return
statements within this method. Open
return '2,4';
Avoid too many return
statements within this method. Open
return '4';
Avoid too many return
statements within this method. Open
return '2,8';
Avoid too many return
statements within this method. Open
return '4+';
Avoid too many return
statements within this method. Open
return '5-';
Avoid too many return
statements within this method. Open
return '3,6';
Avoid too many return
statements within this method. Open
return '3,4';
Avoid too many return
statements within this method. Open
return '3';
Avoid too many return
statements within this method. Open
return '–';
Avoid too many return
statements within this method. Open
return '3,9';
Avoid too many return
statements within this method. Open
return '3,1';
Avoid too many return
statements within this method. Open
return '3,5';
Avoid too many return
statements within this method. Open
return ' ';
Avoid too many return
statements within this method. Open
return '4-';
Avoid too many return
statements within this method. Open
return '5';
Avoid too many return
statements within this method. Open
return '3,0';
Avoid too many return
statements within this method. Open
return '2,9';
Avoid too many return
statements within this method. Open
return '3,2';
Avoid too many return
statements within this method. Open
return '3,7';
Avoid too many return
statements within this method. Open
return '3,8';
Avoid too many return
statements within this method. Open
return '2-';
Avoid too many return
statements within this method. Open
return '3-';
Avoid too many return
statements within this method. Open
return '3,3';
Avoid too many return
statements within this method. Open
return '3+';
Avoid too many return
statements within this method. Open
return '6';
Avoid too many return
statements within this method. Open
return '2,7';
Avoid too many return
statements within this method. Open
return '4,0';
Avoid too many return
statements within this method. Open
return '2';
Avoid too many return
statements within this method. Open
return '5+';
Function calcAbiturExamGradesTotalForVerbalExam
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function calcAbiturExamGradesTotalForVerbalExam(
TblPrepareAdditionalGrade $tblVerbalExamGrade,
TblPrepareAdditionalGrade $tblExtraVerbalGrade = null
) {
- 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 calcAbiturExamGradesTotalForWrittenExam
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function calcAbiturExamGradesTotalForWrittenExam(
TblPrepareAdditionalGrade $tblWrittenExamGrade,
TblPrepareAdditionalGrade $tblExtraVerbalGrade = null
) {
- 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 getCertificateMultiLeaveContent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getCertificateMultiLeaveContent(TblDivision $tblDivision) {
$Content = array();
if (($tblLeaveStudentList = $this->getLeaveStudentAllByDivision($tblDivision))) {
foreach ($tblLeaveStudentList as $tblLeaveStudent) {
- 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 updatePrepareStudentSetApproved
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function updatePrepareStudentSetApproved(TblPrepareStudent $tblPrepareStudent)
{
if (($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())
&& ($tblPrepare = $tblPrepareStudent->getTblPrepareCertificate())
- 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 updatePrepareDivisionSetApproved
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function updatePrepareDivisionSetApproved(TblPrepareCertificate $tblPrepare)
{
if (($tblDivision = $tblPrepare->getServiceTblDivision())) {
if (($tblGenerateCertificate = $tblPrepare->getServiceTblGenerateCertificate())
- 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 createLeaveStudentFromForm
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function createLeaveStudentFromForm(
IFormInterface $form = null,
TblPerson $tblPerson,
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
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (($tblAddress = $tblCompany->fetchMainAddress())) {
$Content['P' . $personId]['Company']['Address']['Street']['Name'] = $tblAddress->getStreetName();
$Content['P' . $personId]['Company']['Address']['Street']['Number'] = $tblAddress->getStreetNumber();
$Content['P' . $personId]['Company']['Address']['City']['Code'] = $tblAddress->getTblCity()->getCode();
$Content['P' . $personId]['Company']['Address']['City']['Name'] = $tblAddress->getTblCity()->getDisplayName();
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 154.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (($tblAddress = $tblPerson->fetchMainAddress())) {
$Content['P' . $personId]['Person']['Address']['Street']['Name'] = $tblAddress->getStreetName();
$Content['P' . $personId]['Person']['Address']['Street']['Number'] = $tblAddress->getStreetNumber();
$Content['P' . $personId]['Person']['Address']['City']['Code'] = $tblAddress->getTblCity()->getCode();
$Content['P' . $personId]['Person']['Address']['City']['Name'] = $tblAddress->getTblCity()->getDisplayName();
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 154.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
} else {
if (($tblPrepareAdditionalGradeType = Prepare::useService()->getPrepareAdditionalGradeTypeByIdentifier('VERBAL_EXAM'))
&& ($verbalExamGrade = Prepare::useService()->getPrepareAdditionalGradeByRanking(
$tblPrepareCertificate,
$tblPerson,
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 135.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ($i < 4) {
if (($tblPrepareAdditionalGradeType = Prepare::useService()->getPrepareAdditionalGradeTypeByIdentifier('WRITTEN_EXAM'))
&& ($writtenExamGrade = Prepare::useService()->getPrepareAdditionalGradeByRanking(
$tblPrepareCertificate,
$tblPerson,
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 135.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ($tblOrientationSubject) {
if ($tblOrientationSubject->getId() == $tblSubject->getId()) {
continue;
}
} elseif (($tblStudent = $tblPerson->getStudent())
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 128.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ($tblProfileSubject) {
if ($tblProfileSubject->getId() == $tblSubject->getId()) {
continue;
}
} elseif (($tblStudent = $tblPerson->getStudent())
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 128.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
foreach ($tblYearList as $tblYearItem) {
if ($tblYear && $tblYear->getId() == $tblYearItem->getId()) {
$buttonList[] = (new Standard(new Info(new Bold($tblYearItem->getDisplayName())),
$Route, new Edit(), array('YearId' => $tblYearItem->getId())));
} else {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 123.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
} elseif (!isset($Content['P' . $personId]['Person']['Parent']['Father']['Name'])) {
$Content['P' . $personId]['Person']['Parent']['Father']['Name']['First'] = $tblFromPerson->getFirstSecondName();
$Content['P' . $personId]['Person']['Parent']['Father']['Name']['Last'] = $tblFromPerson->getLastName();
$father = ($IsTitle ? $tblFromPerson->getTitle().' ' : '').
$tblFromPerson->getFirstSecondName().' '.$tblFromPerson->getLastName();
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 115.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (!isset($Content['P' . $personId]['Person']['Parent']['Mother']['Name'])) {
$Content['P' . $personId]['Person']['Parent']['Mother']['Name']['First'] = $tblFromPerson->getFirstSecondName();
$Content['P' . $personId]['Person']['Parent']['Mother']['Name']['Last'] = $tblFromPerson->getLastName();
$mother = ($IsTitle ? $tblFromPerson->getTitle().' ' : '').
$tblFromPerson->getFirstSecondName().' '.$tblFromPerson->getLastName();
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 115.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if ($field == 'SchoolType'
&& method_exists($Certificate, 'selectValuesSchoolType')
) {
$value = $Certificate->selectValuesSchoolType()[$value];
} elseif ($field == 'Type'
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 109.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if ($field == 'SchoolType'
&& method_exists($Certificate, 'selectValuesSchoolType')
) {
$value = $Certificate->selectValuesSchoolType()[$value];
} elseif ($field == 'Type'
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 109.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (($tblStudentSubjectType = Student::useService()->getStudentSubjectTypeByIdentifier('ADVANCED'))
&& ($tblStudentSubjectList = Student::useService()->getStudentSubjectAllByStudentAndSubjectType($tblStudent,
$tblStudentSubjectType))
) {
/** @var TblStudentSubject $tblStudentSubject */
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 103.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (($tblStudentSubjectType = Student::useService()->getStudentSubjectTypeByIdentifier('ORIENTATION'))
&& ($tblStudentSubjectList = Student::useService()->getStudentSubjectAllByStudentAndSubjectType($tblStudent,
$tblStudentSubjectType))
) {
/** @var TblStudentSubject $tblStudentSubject */
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 103.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if ($HasAllYears) {
if ($IsAllYears) {
$buttonList[] = (new Standard(new Info(new Bold('Alle Schuljahre')),
$Route, new Edit(), array('IsAllYears' => true)));
} else {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 102.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
if (isset($Data['Remark'])) {
if (($tblPrepareInformation = $this->getPrepareInformationBy($tblPrepare, $tblPerson, 'Remark'))) {
(new Data($this->getBinding()))->updatePrepareInformation(
$tblPrepareInformation,
'Remark',
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 96.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
if (isset($Data['BellPoints'])) {
if (($tblPrepareInformation = $this->getPrepareInformationBy($tblPrepare, $tblPerson, 'BellPoints'))) {
(new Data($this->getBinding()))->updatePrepareInformation(
$tblPrepareInformation,
'BellPoints',
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 96.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
if (isset($Data['BellSubject'])) {
if (($tblPrepareInformation = $this->getPrepareInformationBy($tblPrepare, $tblPerson, 'BellSubject'))) {
(new Data($this->getBinding()))->updatePrepareInformation(
$tblPrepareInformation,
'BellSubject',
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 96.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
foreach ($Data as $midTerm => $subjects) {
if (is_array($subjects)
&& (($tblPrepareAdditionalGradeType = $this->getPrepareAdditionalGradeTypeByIdentifier($midTerm)))
) {
foreach ($subjects as $subjectId => $value) {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 93.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
foreach ($Data as $midTerm => $subjects) {
if (is_array($subjects)
&& (($tblPrepareAdditionalGradeType = $this->getPrepareAdditionalGradeTypeByIdentifier($midTerm)))
) {
foreach ($subjects as $subjectId => $value) {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 93.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76