Function setGraduate
has a Cognitive Complexity of 371 (exceeds 5 allowed). Consider refactoring. Open
private static function setGraduate(
$tblPastYearList,
&$Content,
TblType $tblKamenzSchoolType
) {
- 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
File KamenzReportService.php
has 1998 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace SPHERE\Application\Document\Generator\Service\Kamenz;
use SPHERE\Application\Corporation\Group\Group;
Function setRepeatersFromCertificates
has a Cognitive Complexity of 171 (exceeds 5 allowed). Consider refactoring. Open
private static function setRepeatersFromCertificates(&$Content, $tblPastYearList, TblType $tblKamenzSchoolType)
{
if ($tblPastYearList) {
foreach ($tblPastYearList as $tblPastYear) {
- 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 setSchoolTypeLastYear
has a Cognitive Complexity of 108 (exceeds 5 allowed). Consider refactoring. Open
private static function setSchoolTypeLastYear(
&$Content,
$tblPastYearList,
TblPerson $tblPerson,
$tblCourse,
- 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 countCourses
has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring. Open
private static function countCourses(
TblLevel $tblLevel,
TblDivision $tblDivision,
&$countAdvancedCourseArray,
&$countBasicCourseArray,
- 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 countForeignLanguages
has a Cognitive Complexity of 98 (exceeds 5 allowed). Consider refactoring. Open
private static function countForeignLanguages(
TblStudent $tblStudent,
TblLevel $tblLevel,
TblType $tblType,
&$Content,
- 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 setKamenzReportGymContent
has a Cognitive Complexity of 98 (exceeds 5 allowed). Consider refactoring. Open
public static function setKamenzReportGymContent(
$Content
) {
$tblCurrentYearList = 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 setStudentFocus
has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring. Open
private static function setStudentFocus(
TblPerson $tblPerson,
TblLevel $tblLevel,
&$Content,
$gender,
- 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 setNewSchoolStarter
has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring. Open
private static function setNewSchoolStarter(
&$Content,
TblPerson $tblPerson,
TblStudent $tblStudent,
TblLevel $tblLevel,
- 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 countStudentLevels
has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring. Open
private static function countStudentLevels(
TblPerson $tblPerson,
TblLevel $tblLevel,
&$gender,
$hasMigrationBackground,
- 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 setKamenzReportOsContent
has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring. Open
public static function setKamenzReportOsContent(
$Content
) {
$tblCurrentYearList = 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 setKamenzReportGsContent
has a Cognitive Complexity of 81 (exceeds 5 allowed). Consider refactoring. Open
public static function setKamenzReportGsContent(
$Content
) {
$tblCurrentYearList = 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
Method setGraduate
has 227 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function setGraduate(
$tblPastYearList,
&$Content,
TblType $tblKamenzSchoolType
) {
Function setCoursesMatrix
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
private static function setCoursesMatrix(
&$Content,
$personAdvancedCourseList
) {
- 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 setDivisionStudents
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
private static function setDivisionStudents(
&$Content,
TblPerson $tblPerson,
TblLevel $tblLevel,
TblDivision $tblDivision,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function setDivisionStudentsForSecondarySchool
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
private static function setDivisionStudentsForSecondarySchool(
&$Content,
$countDivisionStudents
) {
- 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 setStudentLevels
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
private static function setStudentLevels(
&$Content,
$countArray,
$countMigrantsArray,
$countMigrantsNationalityArray
- 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 setSchoolTypeLastYear
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function setSchoolTypeLastYear(
&$Content,
$tblPastYearList,
TblPerson $tblPerson,
$tblCourse,
Method setKamenzReportGymContent
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function setKamenzReportGymContent(
$Content
) {
$tblCurrentYearList = false;
KamenzReportService
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
class KamenzReportService
{
/**
* @param array $Content
Function setCourses
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
private static function setCourses(
&$Content,
$countAdvancedCourseArray,
$countBasisCourseArray
) {
- 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 setKamenzReportGsContent
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function setKamenzReportGsContent(
$Content
) {
$tblCurrentYearList = false;
Method setKamenzReportOsContent
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function setKamenzReportOsContent(
$Content
) {
$tblCurrentYearList = false;
Function setProfile
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
private static function setProfile(
&$Content,
$countProfileArray
) {
- 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 setStudentFocus
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function setStudentFocus(
TblPerson $tblPerson,
TblLevel $tblLevel,
&$Content,
$gender,
Function setForeignLanguages
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
private static function setForeignLanguages(
&$Content,
$countForeignSubjectArray,
$countSecondForeignSubjectArray,
TblType $tblSchoolType
- 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 setRepeatersFromCertificates
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function setRepeatersFromCertificates(&$Content, $tblPastYearList, TblType $tblKamenzSchoolType)
{
if ($tblPastYearList) {
foreach ($tblPastYearList as $tblPastYear) {
Function setRepeatersGym
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
private static function setRepeatersGym(
TblPerson $tblPerson,
TblLevel $tblLevel,
TblDivision $tblDivision,
&$Content,
- 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 setRepeatersOs
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
private static function setRepeatersOs(
TblPerson $tblPerson,
TblLevel $tblLevel,
TblDivision $tblDivision,
&$Content,
- 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 countForeignLanguages
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function countForeignLanguages(
TblStudent $tblStudent,
TblLevel $tblLevel,
TblType $tblType,
&$Content,
Function setForeignLanguagesMatrix
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
private static function setForeignLanguagesMatrix(
&$Content,
$countForeignSubjectMatrix
) {
/**
- 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 setNewSchoolStarter
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function setNewSchoolStarter(
&$Content,
TblPerson $tblPerson,
TblStudent $tblStudent,
TblLevel $tblLevel,
Function countOrientation
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
private static function countOrientation(
TblStudent $tblStudent,
TblLevel $tblLevel,
$gender,
$countOrientationArray
- 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 setStudentLevels
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function setStudentLevels(
&$Content,
$countArray,
$countMigrantsArray,
$countMigrantsNationalityArray
Method countStudentLevels
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function countStudentLevels(
TblPerson $tblPerson,
TblLevel $tblLevel,
&$gender,
$hasMigrationBackground,
Method setDivisionStudents
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function setDivisionStudents(
&$Content,
TblPerson $tblPerson,
TblLevel $tblLevel,
TblDivision $tblDivision,
Method countCourses
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function countCourses(
TblLevel $tblLevel,
TblDivision $tblDivision,
&$countAdvancedCourseArray,
&$countBasicCourseArray,
Method setCoursesMatrix
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function setCoursesMatrix(
&$Content,
$personAdvancedCourseList
) {
Function countDivisionStudentsForSecondarySchool
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private static function countDivisionStudentsForSecondarySchool(
&$countDivisionStudents,
TblDivision $tblDivision,
TblLevel $tblLevel,
TblCourse $tblCourse = 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 setOrientation
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private static function setOrientation(
&$Content,
$countOrientationArray
) {
/**
- 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 setCourses
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function setCourses(
&$Content,
$countAdvancedCourseArray,
$countBasisCourseArray
) {
Method setDivisionStudentsForSecondarySchool
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function setDivisionStudentsForSecondarySchool(
&$Content,
$countDivisionStudents
) {
Function countProfile
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private static function countProfile(
TblStudent $tblStudent,
TblLevel $tblLevel,
$gender,
$countProfileArray
- 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 setForeignLanguages
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function setForeignLanguages(
&$Content,
$countForeignSubjectArray,
$countSecondForeignSubjectArray,
TblType $tblSchoolType
Method setProfile
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function setProfile(
&$Content,
$countProfileArray
) {
Function countForeignLanguagesMatrix
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private static function countForeignLanguagesMatrix(
TblPerson $tblPerson,
TblLevel $tblLevel,
$countForeignSubjectMatrix
) {
- 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 setDivisionFrequency
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private static function setDivisionFrequency(
&$Content,
$countDivisionStudentArray
) {
/**
- 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 setReligion
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private static function setReligion(
&$Content,
$countReligionArray
) {
/**
- 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 countStudentLevels
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
TblPerson $tblPerson,
TblLevel $tblLevel,
&$gender,
$hasMigrationBackground,
$isInPreparationDivisionForMigrants,
Function countReligion
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private static function countReligion(
TblStudent $tblStudent,
TblLevel $tblLevel,
$countReligionArray
) {
- 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 setForeignLanguagesMatrix
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function setForeignLanguagesMatrix(
&$Content,
$countForeignSubjectMatrix
) {
/**
Method countOrientation
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function countOrientation(
TblStudent $tblStudent,
TblLevel $tblLevel,
$gender,
$countOrientationArray
Method countDivisionStudentsForSecondarySchool
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function countDivisionStudentsForSecondarySchool(
&$countDivisionStudents,
TblDivision $tblDivision,
TblLevel $tblLevel,
TblCourse $tblCourse = null,
Method setNewSchoolStarter
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
&$Content,
TblPerson $tblPerson,
TblStudent $tblStudent,
TblLevel $tblLevel,
TblDivision $tblDivision,
Method setSchoolTypeLastYear
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
&$Content,
$tblPastYearList,
TblPerson $tblPerson,
$tblCourse,
TblLevel $tblLevel,
Method countForeignLanguages
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
TblStudent $tblStudent,
TblLevel $tblLevel,
TblType $tblType,
&$Content,
$gender,
Method setDivisionStudents
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
&$Content,
TblPerson $tblPerson,
TblLevel $tblLevel,
TblDivision $tblDivision,
$gender,
Avoid deeply nested control flow statements. Open
if ($tblPrepareStudent->isPrinted()
&& ($tblPerson = $tblPrepareStudent->getServiceTblPerson())
&& ((($tblPrepareInformationTransfer = Prepare::useService()->getPrepareInformationBy(
$tblPrepare, $tblPerson, 'Transfer'
))
Avoid deeply nested control flow statements. Open
if ($tblSchoolEnrollmentType->getIdentifier() == 'PREMATURE') {
if (isset($Content['D01']['Premature'][$gender])) {
$Content['D01']['Premature'][$gender]++;
} else {
$Content['D01']['Premature'][$gender] = 1;
Avoid deeply nested control flow statements. Open
if ($hasMigrationBackground) {
if (isset($countMigrantsArray[$birthYear][$tblLevel->getName()][$gender])) {
$countMigrantsArray[$birthYear][$tblLevel->getName()][$gender]++;
} else {
$countMigrantsArray[$birthYear][$tblLevel->getName()][$gender] = 1;
Avoid deeply nested control flow statements. Open
if ($birthYear) {
if (isset($countArray[$birthYear]['Leave'][$gender])) {
$countArray[$birthYear]['Leave'][$gender]++;
} else {
$countArray[$birthYear]['Leave'][$gender] = 1;
Avoid deeply nested control flow statements. Open
if ($isInPreparationDivisionForMigrants) {
if (isset($countArray[$birthYear]['Migration'][$gender])) {
$countArray[$birthYear]['Migration'][$gender]++;
} else {
$countArray[$birthYear]['Migration'][$gender] = 1;
Avoid deeply nested control flow statements. Open
if ($hasMigrationBackground) {
if (isset($Content['B01_1']['Leave']['L' . $certificate][$gender])) {
$Content['B01_1']['Leave']['L' . $certificate][$gender]++;
} else {
$Content['B01_1']['Leave']['L' . $certificate][$gender] = 1;
Avoid deeply nested control flow statements. Open
if ($tblPrepareStudent->isPrinted()
&& ($tblPerson = $tblPrepareStudent->getServiceTblPerson())
&& ($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())
) {
Avoid deeply nested control flow statements. Open
if ($tblSubjectStudent->getServiceTblPerson()) {
if (($tblPerson = $tblSubjectStudent->getServiceTblPerson())) {
if ($tblSubject->getName() == 'Deutsch' || $tblSubject->getName() == 'Mathematik') {
$personAdvancedCourseList[$tblLevel->getName()][$tblPerson->getId()][0]
Avoid deeply nested control flow statements. Open
if (($tblPerson = $tblSubjectStudent->getServiceTblPerson())
&& ($tblCommon = Common::useService()->getCommonByPerson($tblPerson))
&& ($tblCommonBirthDates = $tblCommon->getTblCommonBirthDates())
&& ($tblCommonGender = $tblCommonBirthDates->getTblCommonGender())
) {
Avoid deeply nested control flow statements. Open
if (($tblCourseTransfer = $tblStudentTransfer->getServiceTblCourse())) {
if($tblCourseTransfer->getName() == 'Hauptschule') {
$identifier = 'SecondarySchoolHs';
} elseif ($tblCourseTransfer->getName() == 'Realschule') {
$identifier = 'SecondarySchoolRs';
Method setStudentFocus
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
TblPerson $tblPerson,
TblLevel $tblLevel,
&$Content,
$gender,
$hasMigrationBackground,
Method countDivisionStudentsForSecondarySchool
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
&$countDivisionStudents,
TblDivision $tblDivision,
TblLevel $tblLevel,
TblCourse $tblCourse = null,
$gender,
Consider simplifying this complex logical expression. Open
if ($tblPrepareStudent->isPrinted()
&& ($tblPerson = $tblPrepareStudent->getServiceTblPerson())
&& ((($tblPrepareInformationTransfer = Prepare::useService()->getPrepareInformationBy(
$tblPrepare, $tblPerson, 'Transfer'
))
Method countCourses
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
TblLevel $tblLevel,
TblDivision $tblDivision,
&$countAdvancedCourseArray,
&$countBasicCourseArray,
&$personAdvancedCourseList
Method setRepeatersGym
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
TblPerson $tblPerson,
TblLevel $tblLevel,
TblDivision $tblDivision,
&$Content,
$gender
Method setRepeatersOs
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
TblPerson $tblPerson,
TblLevel $tblLevel,
TblDivision $tblDivision,
&$Content,
$gender
Function hasRepeaters
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static function hasRepeaters(
TblPerson $tblPerson,
TblLevel $tblLevel,
TblDivision $tblDivision
) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getForeignLanguages
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static function getForeignLanguages(TblPerson $tblPerson)
{
$subjects = array();
if (($tblStudent = $tblPerson->getStudent())
&& ($tblStudentSubjectType = Student::useService()->getStudentSubjectTypeByIdentifier('FOREIGN_LANGUAGE'))
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Similar blocks of code found in 2 locations. Consider refactoring. Open
if ($hasMigrationBackground) {
if (isset($Content['F01'][$name]['HasMigrationBackground']['L' . $tblLevel->getName()][$gender])) {
$Content['F01'][$name]['HasMigrationBackground']['L' . $tblLevel->getName()][$gender]++;
} else {
$Content['F01'][$name]['HasMigrationBackground']['L' . $tblLevel->getName()][$gender] = 1;
- 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 359.
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 ($hasAutism) {
if (isset($Content['F01'][$name]['Autism']['L' . $tblLevel->getName()][$gender])) {
$Content['F01'][$name]['Autism']['L' . $tblLevel->getName()][$gender]++;
} else {
$Content['F01'][$name]['Autism']['L' . $tblLevel->getName()][$gender] = 1;
- 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 359.
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
foreach ($countMigrantsArray as $year => $levelArray) {
$Content['E02_1']['Y' . $count]['YearName'] = $year;
$Content['E02_1']['Y' . $count]['m'] = 0;
$Content['E02_1']['Y' . $count]['w'] = 0;
$Content['E02_1']['Y' . $count]['x'] = 0;
- 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 278.
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
foreach ($countArray as $year => $levelArray) {
$Content['E02']['Y' . $count]['YearName'] = $year;
$Content['E02']['Y' . $count]['m'] = 0;
$Content['E02']['Y' . $count]['w'] = 0;
$Content['E02']['Y' . $count]['x'] = 0;
- 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 278.
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
foreach ($countMigrantsNationalityArray as $nation => $levelArray) {
$Content['E03']['N' . $count]['NationalityName'] = $nation;
$Content['E03']['N' . $count]['m'] = 0;
$Content['E03']['N' . $count]['w'] = 0;
$Content['E03']['N' . $count]['x'] = 0;
- 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 278.
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
foreach ($levelArray as $level => $genderArray) {
foreach ($genderArray as $gender => $value) {
$Content['E12']['S' . $count]['L' . $level][$gender] = $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 215.
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
foreach ($levelArray as $level => $genderArray) {
foreach ($genderArray as $gender => $value) {
$Content['E11']['S' . $count]['L' . $level][$gender] = $value;
if (isset($Content['E11']['TotalCount']['L' . $level][$gender])) {
- 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 215.
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 (isset($Content['C01']['L' . $tblLevel->getName()][$gender])) {
$Content['C01']['L' . $tblLevel->getName()][$gender]++;
} else {
$Content['C01']['L' . $tblLevel->getName()][$gender] = 1;
- 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 138.
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 ($gender) {
if (isset($Content['E08']['L' . $tblLevel->getName()][$gender])) {
$Content['E08']['L' . $tblLevel->getName()][$gender]++;
} else {
$Content['E08']['L' . $tblLevel->getName()][$gender] = 1;
- 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 138.
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
foreach ($levelArray as $level => $valueArray) {
foreach ($valueArray as $identifier => $value) {
$Content['E16']['S' . $count]['L' . $level][$identifier] = $value;
if (isset($Content['E16']['TotalCount']['L' . $level][$identifier])) {
- 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 124.
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
foreach ($array['Levels'] as $level => $genderArray) {
foreach ($genderArray as $gender => $value) {
$Content['E18']['S' . $count]['L' . $level][$gender] = $value;
if (isset($Content['E18']['TotalCount']['L' . $level][$gender])) {
- 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 124.
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
private static function getForeignLanguages(TblPerson $tblPerson)
{
$subjects = array();
if (($tblStudent = $tblPerson->getStudent())
&& ($tblStudentSubjectType = Student::useService()->getStudentSubjectTypeByIdentifier('FOREIGN_LANGUAGE'))
- 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 119.
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 5 locations. Consider refactoring. Open
if (isset($Content['E07'][$identifier]['L' . $tblLevel->getName()][$gender])) {
$Content['E07'][$identifier]['L' . $tblLevel->getName()][$gender]++;
} else {
$Content['E07'][$identifier]['L' . $tblLevel->getName()][$gender] = 1;
}
- 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 91.
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 5 locations. Consider refactoring. Open
if (isset($Content['E07'][$identifier]['L' . $tblLevel->getName()][$gender])) {
$Content['E07'][$identifier]['L' . $tblLevel->getName()][$gender]++;
} else {
$Content['E07'][$identifier]['L' . $tblLevel->getName()][$gender] = 1;
}
- 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 91.
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 5 locations. Consider refactoring. Open
if (isset($Content['E07'][$identifier]['L' . $tblLevel->getName()][$gender])) {
$Content['E07'][$identifier]['L' . $tblLevel->getName()][$gender]++;
} else {
$Content['E07'][$identifier]['L' . $tblLevel->getName()][$gender] = 1;
}
- 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 91.
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 5 locations. Consider refactoring. Open
if (isset($Content['C01'][$course]['L' . $tblLevel->getName()][$gender])) {
$Content['C01'][$course]['L' . $tblLevel->getName()][$gender]++;
} else {
$Content['C01'][$course]['L' . $tblLevel->getName()][$gender] = 1;
}
- 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 91.
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 5 locations. Consider refactoring. Open
if (isset($Content['E07'][$identifier]['L' . $tblLevel->getName()][$gender])) {
$Content['E07'][$identifier]['L' . $tblLevel->getName()][$gender]++;
} else {
$Content['E07'][$identifier]['L' . $tblLevel->getName()][$gender] = 1;
}
- 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 91.
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['E01']['Student']['L' . $tblLevel->getName()][$gender])) {
$Content['E01']['Student']['L' . $tblLevel->getName()][$gender]++;
} else {
$Content['E01']['Student']['L' . $tblLevel->getName()][$gender] = 1;
}
- 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 91.
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['B01_1'][$tblCertificate->getCertificate()]['L' . $certificate][$gender])) {
$Content['B01_1'][$tblCertificate->getCertificate()]['L' . $certificate][$gender]++;
} else {
$Content['B01_1'][$tblCertificate->getCertificate()]['L' . $certificate][$gender] = 1;
}
- 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 91.
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['E08']['WithoutCourse']['L' . $tblLevel->getName()][$gender])) {
$Content['E08']['WithoutCourse']['L' . $tblLevel->getName()][$gender]++;
} else {
$Content['E08']['WithoutCourse']['L' . $tblLevel->getName()][$gender] = 1;
}
- 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 91.
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['B01'][$tblCertificate->getCertificate()]['L' . $certificate][$gender])) {
$Content['B01'][$tblCertificate->getCertificate()]['L' . $certificate][$gender]++;
} else {
$Content['B01'][$tblCertificate->getCertificate()]['L' . $certificate][$gender] = 1;
}
- 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 91.
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