Showing 5,014 of 7,620 total issues
Function runConvert
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function runConvert($Row)
{
$ColumnMatch = 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 runConvert
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function runConvert($Row)
{
$ColumnMatch = 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 updateUntisImportLectureship
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
TblUntisImportLectureship $tblUntisImportLectureship = null,
TblDivision $tblDivision = null,
TblTeacher $tblTeacher = null,
TblSubject $tblSubject = null,
$SubjectGroup = '',
Avoid deeply nested control flow statements. Open
if ($tblPerson && $tblDivision &&
Division::useService()->getDivisionStudentByDivisionAndPerson($tblDivision,
$tblPerson)
) {
if ($tblDivisionSubject) {
Avoid deeply nested control flow statements. Open
if(($tblCompany = $tblStudentIntegration->getServiceTblCompany())){
$Company = $tblCompany->getDisplayName();
}
Method updateIndiwareImportLectureship
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
TblIndiwareImportLectureship $tblIndiwareImportLectureship = null,
TblDivision $tblDivision = null,
TblTeacher $tblTeacher = null,
TblSubject $tblSubject = null,
$SubjectGroup = '',
Function frontendLectureshipShow
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function frontendLectureshipShow($Visible = false)
{
$Stage = new Stage('Lehraufträge', 'Übersicht');
$Stage->addButton(new Standard('Zurück', '/Transfer/Indiware/Import', new ChevronLeft()));
$tblIndiwareImportLectureshipList = Import::useService()->getIndiwareImportLectureshipAll(true);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid deeply nested control flow statements. Open
if($tblSupport){
$countDecision++;
if(($tblStudentFocusList = Student::useService()->getStudentFocusAllByStudent($tblStudent))){
foreach($tblStudentFocusList as $tblStudentFocus){
$FocusName = $tblStudentFocus->getTblStudentFocusType()->getName();
Method createIndiwareImportLectureship
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Manager $Manager,
TblYear $tblYear,
TblAccount $tblAccount,
$Result = array(),
$TeacherCount = 1,
Avoid deeply nested control flow statements. Open
if ($mailAddress != '') {
Mail::useService()->insertMailToPerson(
$tblPerson,
$mailAddress,
Mail::useService()->getTypeById(1),
Avoid deeply nested control flow statements. Open
if ($pos !== false) {
$cityDistrict = trim(substr($cityName, $pos));
$cityName = trim(substr($cityName, 0, $pos));
}
Avoid deeply nested control flow statements. Open
if ($tblSubject) {
Student::useService()->addStudentSubject(
$tblStudent,
Student::useService()->getStudentSubjectTypeByIdentifier('RELIGION'),
Student::useService()->getStudentSubjectRankingByIdentifier('1'),
Avoid deeply nested control flow statements. Open
if (trim($Document->getValue($Document->getCell($Location['Wohnort'],
$RunY))) != ''
) {
$Street = trim($Document->getValue($Document->getCell($Location['Straße'],
$RunY)));
Avoid deeply nested control flow statements. Open
if (preg_match_all('!\d+!', $Street, $matches)) {
$pos = strpos($Street, $matches[0][0]);
if ($pos !== null) {
$StreetName = trim(substr($Street, 0, $pos));
$StreetNumber = trim(substr($Street, $pos));
Avoid deeply nested control flow statements. Open
if ($pos !== null) {
$StreetName = trim(substr($Street, 0, $pos));
$StreetNumber = trim(substr($Street, $pos));
}
Avoid deeply nested control flow statements. Open
if ($subjectLanguage !== '') {
if ($subjectLanguage === 'EN'
|| $subjectLanguage === 'Englisch'
) {
$tblSubject = Subject::useService()->getSubjectByAcronym('EN');
Avoid deeply nested control flow statements. Open
if ($tblCategory) {
$tblStudentAgreementTypeAll = Student::useService()->getStudentAgreementTypeAllByCategory($tblCategory);
if ($tblStudentAgreementTypeAll) {
foreach ($tblStudentAgreementTypeAll as $tblStudentAgreementType) {
Student::useService()->insertStudentAgreement($tblStudent,
Avoid deeply nested control flow statements. Open
if ($tblLevel) {
$Division = trim($Document->getValue($Document->getCell($Location['Schüler_Klasse'],
$RunY)));
if ($Division != '') {
if (( $pos = strpos($Division, $Level) ) !== false) {
Avoid deeply nested control flow statements. Open
if ($pos !== false) {
$cityDistrict = trim(substr($cityName, $pos));
$cityName = trim(substr($cityName, 0, $pos));
}
Avoid deeply nested control flow statements. Open
if (0 === strpos($phoneNumber, '01')) {
$tblType = Phone::useService()->getTypeById(2);
}