fix: SA: Split critical issues in its own file.

SA stands for Static Analysis.
This commit is contained in:
Pol Dellaiera
2021-11-16 13:55:55 +01:00
parent c68bda5c9b
commit 8ede116cf5
12 changed files with 333 additions and 380 deletions

View File

@@ -1044,9 +1044,9 @@ class AccompanyingPeriod implements TrackCreationInterface, TrackUpdateInterface
{
if (count($this->getPersons()) === 0){
return null;
} else {
return $this->getPersons()->first()->getCenter();
}
return $this->getPersons()->first()->getCenter();
}
/**
@@ -1116,7 +1116,9 @@ class AccompanyingPeriod implements TrackCreationInterface, TrackUpdateInterface
{
if ($this->getPersonLocation() instanceof Person) {
return 'person';
} elseif ($this->getAddressLocation() instanceof Address) {
}
if ($this->getAddressLocation() instanceof Address) {
return 'address';
} else {
return 'none';
@@ -1137,11 +1139,11 @@ class AccompanyingPeriod implements TrackCreationInterface, TrackUpdateInterface
public function getGroupSequence()
{
if ($this->getStep() == self::STEP_DRAFT)
{
if ($this->getStep() == self::STEP_DRAFT) {
return [[self::STEP_DRAFT]];
} elseif ($this->getStep() == self::STEP_CONFIRMED)
{
}
if ($this->getStep() == self::STEP_CONFIRMED) {
return [[self::STEP_DRAFT, self::STEP_CONFIRMED]];
}