Showing 5,014 of 7,620 total issues
Function getServiceTblObject
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getServiceTblObject()
{
if (null === $this->serviceTblObject) {
return 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
Avoid deeply nested control flow statements. Open
if ($tblProspectReservation->getServiceTblTypeOptionB()) {
$DataPerson['ReservationOptionB'] = $tblProspectReservation->getServiceTblTypeOptionB()->getName();
}
Avoid deeply nested control flow statements. Open
if ($tblObjectType->getIdentifier() === 'PERSON') {
foreach ($objects as $objectId => $value) {
$countTotalPerson++;
$tblPerson = Person::useService()->getPersonById($objectId);
if ($tblPerson) {
Avoid deeply nested control flow statements. Open
if ($tblListObjectElementList->getValue() == 1) {
$list[$count]['Field'.$tblListElementList->getId()] = new Center(new SuccessIcon());
}
Avoid deeply nested control flow statements. Open
if ($tblProspectReservation) {
$filterLevel = trim($tblProspectReservation->getReservationDivision());
}
Avoid deeply nested control flow statements. Open
if ($tblProspectReservation) {
$level = $tblProspectReservation->getReservationDivision();
$year = $tblProspectReservation->getReservationYear();
$optionA = $tblProspectReservation->getServiceTblTypeOptionA();
$optionB = $tblProspectReservation->getServiceTblTypeOptionB();
Avoid deeply nested control flow statements. Open
if (( $tblAddress = Address::useService()->getAddressByPerson($tblPerson) )) {
$Address = $tblAddress->getGuiTwoRowString();
}
Avoid deeply nested control flow statements. Open
if ($tblProspectReservation->getServiceTblTypeOptionA()) {
$DataPerson['ReservationOptionA'] = $tblProspectReservation->getServiceTblTypeOptionA()->getName();
}
Function updateListElementList
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function updateListElementList(IFormInterface $Stage = null, TblList $tblList, TblListElementList $tblListElementList, $ElementName)
{
/**
* Skip to Frontend
- 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 ($tblGroupList) {
foreach ($tblGroupList as $tblGroup) {
$tblGroupCommon = CompanyGroup::useService()->getGroupByMetaTable('COMMON');
if ($tblGroupCommon->getId() != $tblGroup->getId()) {
$groups[] = $tblGroup->getName();
Avoid deeply nested control flow statements. Open
if(($tblToPhoneList = Phone::useService()->getPhoneAllByPerson($tblPerson))) {
$ProspectPhoneList = array();
foreach ($tblToPhoneList as $tblToPhone) {
if (($tblPhone = $tblToPhone->getTblPhone())) {
$ProspectPhoneList[] = $tblPhone->getNumber()
Avoid deeply nested control flow statements. Open
if ($guardianList) {
foreach ($guardianList as $guardian) {
$tblPersonGuardian = $guardian->getServiceTblPersonFrom();
if ($tblPersonGuardian && $guardian->getTblType()->getId() == 1) {
// get PhoneNumber by Guardian
Avoid deeply nested control flow statements. Open
if ($tblListObjectElementList->getValue() === "0") {
$list[$count]['Field'.$tblListElementList->getId()] = ' '.$tblListObjectElementList->getValue();
}
Avoid deeply nested control flow statements. Open
if (!$hasFilter) {
$filterPersonObjectList[$tblPerson->getId()] = $tblPerson;
}
Avoid deeply nested control flow statements. Open
if (!empty($objects)) {
foreach ($objects as $objectId => $value) {
if ($tblObjectType->getIdentifier() === 'PERSON') {
$tblPerson = Person::useService()->getPersonById($objectId);
$prospectGroup = Group::useService()->getGroupByMetaTable('PROSPECT');
Function addElementToList
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function addElementToList(IFormInterface $Stage = null, $Id, $Element)
{
/**
* Skip to Frontend
- 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 frontendListObjectElementShow
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$Id = null,
$Filter = null,
// $Data = null,
// $HasData = null,
$YearPersonId = null,
Function frontendSetup
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function frontendSetup($Simulation = true, $Heal = false)
{
$ClassList = get_declared_classes();
self::$ServiceRegister = array_merge(
- 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 uploadNow
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function uploadNow(IFormInterface &$Stage = null, $FileUpload)
{
/**
* Skip to Frontend
- 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 ($num_files < $cache_lo_water_mark) {
break;
}