Showing 5,014 of 7,620 total issues
Avoid deeply nested control flow statements. Open
if ($tblPrivilegeAll) {
/** @var TblPrivilege $tblPrivilege */
foreach ($tblPrivilegeAll as $tblPrivilege) {
$tblRightAll = $tblPrivilege->getTblRightAll();
if ($tblRightAll) {
Method createProtocolEntry
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$DatabaseName,
TblAccount $tblAccount = null,
TblConsumer $tblConsumer = null,
Element $FromEntity = null,
Element $ToEntity = null,
Method createArchiveEntry
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$DatabaseName,
TblAccount $tblAccount = null,
TblConsumer $tblConsumer = null,
Element $Entity = null,
$Type = TblArchive::ARCHIVE_TYPE_CREATE,
Avoid deeply nested control flow statements. Open
if($tblCommonGender->getName() == 'Männlich'){
$Gender = 'm';
} elseif($tblCommonGender->getName() == 'Weiblich') {
$Gender = 'w';
}
Function createIndiwareStudentSubjectOrderBulk
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function createIndiwareStudentSubjectOrderBulk($ImportList, $Period, TblTask $tblTask)
{
$Manager = $this->getConnection()->getEntityManager();
if (!empty($ImportList)) {
- 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 ($tblAccount->getPassword() == $Password) {
$IsEqual = true;
}
Avoid deeply nested control flow statements. Open
if(($tblStudentDisorderList = Student::useService()->getStudentDisorderAllByStudent($tblStudent))){
$PersonEditor = '';
$Remark = '';
$tblSpecial = Student::useService()->importSpecial($tblPerson, $Date->format('d.m.Y'), $PersonEditor, $Remark);
if($tblSpecial){
Avoid deeply nested control flow statements. Open
if($Date <= $Decision){
$Date = $Decision;
}
Avoid deeply nested control flow statements. Open
if ($tblGradeList) {
foreach ($tblGradeList as $tblGrade) {
$tblPersonStudent = $tblGrade->getServiceTblPerson();
if ($tblPersonStudent) {
Avoid deeply nested control flow statements. Open
if($Date <= $Counsel){
$Date = $Counsel;
}
Function runConvert
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function runConvert($Row)
{
$ColumnMatch = array(
// Muster in Spalte ?? gefunden
- 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 renderDiffToHTMLFromOpcode
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static function renderDiffToHTMLFromOpcode($opcode, $from, $from_offset, $from_len)
{
if ($opcode === 'c') {
echo htmlentities(substr($from, $from_offset, $from_len));
- 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 setTestPicture
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function setTestPicture(Schema &$Schema)
{
$Table = $this->getConnection()->createTable($Schema, 'tblTestPicture');
if (!$this->getConnection()->hasColumn('tblTestPicture', 'Name')) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method createArchiveEntry
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$DatabaseName,
TblAccount $tblAccount = null,
TblConsumer $tblConsumer = null,
Element $Entity = null,
$Type = TblArchive::ARCHIVE_TYPE_CREATE,
Avoid deeply nested control flow statements. Open
if($tblSupport){
$countRequest++;
if(($tblStudentFocusList = Student::useService()->getStudentFocusAllByStudent($tblStudent))){
foreach($tblStudentFocusList as $tblStudentFocus){
$FocusName = $tblStudentFocus->getTblStudentFocusType()->getName();
Avoid deeply nested control flow statements. Open
if($tblSupport){
$countCounsel++;
if(($tblStudentFocusList = Student::useService()->getStudentFocusAllByStudent($tblStudent))){
foreach($tblStudentFocusList as $tblStudentFocus){
$FocusName = $tblStudentFocus->getTblStudentFocusType()->getName();
Avoid deeply nested control flow statements. Open
if(($tblCompany = $tblStudentIntegration->getServiceTblCompany())){
$Company = $tblCompany->getDisplayName();
}
Avoid deeply nested control flow statements. Open
if(($tblCompany = $tblStudentIntegration->getServiceTblCompany())){
$Company = $tblCompany->getDisplayName();
}
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/Untis/Import', new ChevronLeft()));
$tblUntisImportLectureshipList = Import::useService()->getUntisImportLectureshipAll(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 ($GradeList) {
foreach ($GradeList as $Grade) {
// stop search if every Person got found
if (empty($PersonList)) {
break;