Showing 5,014 of 7,620 total issues
Function getRealNameByViewType
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function getRealNameByViewType($ViewType = TblWorkSpace::VIEW_TYPE_ALL)
{
switch($ViewType){
case TblWorkSpace::VIEW_TYPE_ALL :
$Name = 'Allgemein';
- 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(in_array($tblWorkSpace->getField(), $this->reducedSelectBoxList)) {
// Add AND Condition to Where (if filter is set)
if($Behavior == 1){
$Builder->andWhere(
$Builder->expr()->eq($tblWorkSpace->getView().'.'.$tblWorkSpace->getField(),
Function showDeleteBasketSelection
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function showDeleteBasketSelection($Identifier = '', $BasketVerificationId = '')
{
$tblBasketVerification = Basket::useService()->getBasketVerificationById($BasketVerificationId);
if($tblBasketVerification){
- 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(!isset($_POST['DebtorSelection']['BankReference'])){
$_POST['DebtorSelection']['BankReference'] = $tblBankReferenceList[0]->getId();
}
Avoid deeply nested control flow statements. Open
if($Behavior == 1){
$OrExp = $Builder->expr()->orX(
$Builder->expr()->eq($tblWorkSpace->getView().'.'.$tblWorkSpace->getField(),
$Parameter));
} elseif($Behavior == 2) {
Avoid deeply nested control flow statements. Open
if(in_array($tblWorkSpace->getField(), $this->reducedSelectBoxList)) {
// Add AND Condition to Where (if filter is set)
if($Value === '' && $Behavior == 1){
$Builder->andWhere(
$Builder->expr()->like($tblWorkSpace->getView().'.'.$tblWorkSpace->getField(),
Function getPostForGender
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function getPostForGender($genderSetting, $genderName)
{
$post = null;
if ($genderName == 'Weiblich') {
- 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($tblBasket && new \DateTime($tblBankReference->getReferenceDate()) > new \DateTime($tblBasket->getTargetTime())){
$form->setError('DebtorSelection[BankReference]', 'Die ausgewählte Mandatsreferenznummer
ist zum akuellen Fälligkeitsdatum ('.$tblBasket->getTargetTime().') noch nicht verfügbar.');
$Error = true;
}
Avoid deeply nested control flow statements. Open
if ($tblStudentSubject && ($tblSubject = $tblStudentSubject->getServiceTblSubject())) {
$DataPerson['Edit'] = new Muted('('.$tblSubject->getAcronym().') ').$tblSubject->getName();
}
Avoid deeply nested control flow statements. Open
if ($Label == $i . '. Arbeitsgemeinschaft'){
$tblStudentSubjectType = Student::useService()->getStudentSubjectTypeByIdentifier('TEAM');
$tblStudentSubjectRanking = Student::useService()->getStudentSubjectRankingByIdentifier($i);
$tblStudentSubject = Student::useService()->getStudentSubjectByStudentAndSubjectAndSubjectRanking($tblStudent,
$tblStudentSubjectType, $tblStudentSubjectRanking);
Avoid deeply nested control flow statements. Open
if ($Label == new Muted(new Small($i . '. Fremdsprache von Klasse'))){
$tblStudentSubjectType = Student::useService()->getStudentSubjectTypeByIdentifier('FOREIGN_LANGUAGE');
$tblStudentSubjectRanking = Student::useService()->getStudentSubjectRankingByIdentifier($i);
$tblStudentSubject = Student::useService()->getStudentSubjectByStudentAndSubjectAndSubjectRanking($tblStudent,
$tblStudentSubjectType, $tblStudentSubjectRanking);
Avoid deeply nested control flow statements. Open
if ($Label == new Muted(new Small($i . '. Fremdsprache bis Klasse'))){
$tblStudentSubjectType = Student::useService()->getStudentSubjectTypeByIdentifier('FOREIGN_LANGUAGE');
$tblStudentSubjectRanking = Student::useService()->getStudentSubjectRankingByIdentifier($i);
$tblStudentSubject = Student::useService()->getStudentSubjectByStudentAndSubjectAndSubjectRanking($tblStudent,
$tblStudentSubjectType, $tblStudentSubjectRanking);
Avoid deeply nested control flow statements. Open
if ($Label == $i . '. Fremdsprache'){
$tblStudentSubjectType = Student::useService()->getStudentSubjectTypeByIdentifier('FOREIGN_LANGUAGE');
$tblStudentSubjectRanking = Student::useService()->getStudentSubjectRankingByIdentifier($i);
$tblStudentSubject = Student::useService()->getStudentSubjectByStudentAndSubjectAndSubjectRanking($tblStudent,
$tblStudentSubjectType, $tblStudentSubjectRanking);
Avoid deeply nested control flow statements. Open
if($tblItemCalculation){
$ItemPrice = $tblItemCalculation->getValue();
}
Avoid deeply nested control flow statements. Open
if(($tblItem = $tblBasketVerification->getServiceTblItem())){
$ItemString = $tblItem->getName();
}
Function changeSelectedGender
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function changeSelectedGender()
{
$Global = $this->getGlobal();
$Person = $Global->POST['Person'];
- 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 ($tblStudentTransfer) {
// Ersteinschulung
if (($tblCompany = $tblStudentTransfer->getServiceTblCompany()) && $Label == 'Schule'
&& $tblStudentTransferType->getIdentifier() == 'ENROLLMENT'
) {
Avoid deeply nested control flow statements. Open
if ($tblStudentSubject && ($tblSubject = $tblStudentSubject->getServiceTblSubject())) {
$DataPerson['Edit'] = new Muted('('.$tblSubject->getAcronym().') ').$tblSubject->getName();
}
Method replaceLevelFrom
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$modalField,
$CloneField,
$TypeId,
$RankingId,
$PersonIdArray = array(),
Method replaceLevelTill
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$modalField,
$CloneField,
$TypeId,
$RankingId,
$PersonIdArray = array(),