N°8772 - cleanup code

This commit is contained in:
Eric Espie
2025-10-30 14:24:09 +01:00
parent 601cde0e2d
commit 0df54413b3
23 changed files with 183 additions and 150 deletions

View File

@@ -64,6 +64,7 @@ class AbstractFormIO
public function SetOwnerBlock(AbstractFormBlock $oOwnerBlock): self
{
$this->oOwnerBlock = $oOwnerBlock;
return $this;
}
@@ -87,6 +88,7 @@ class AbstractFormIO
public function SetName(string $sName): self
{
$this->sName = $sName;
return $this;
}
@@ -136,6 +138,7 @@ class AbstractFormIO
{
$PostSetDataExist = array_key_exists(FormEvents::POST_SET_DATA, $this->aValues) && $this->aValues[FormEvents::POST_SET_DATA] !== null;
$PostSubmitExist = array_key_exists(FormEvents::POST_SUBMIT, $this->aValues) && $this->aValues[FormEvents::POST_SUBMIT] !== null;
return $PostSetDataExist || $PostSubmitExist;
}
@@ -170,12 +173,13 @@ class AbstractFormIO
*/
public function Value(): mixed
{
if(array_key_exists(FormEvents::POST_SUBMIT, $this->aValues) ){
if (array_key_exists(FormEvents::POST_SUBMIT, $this->aValues)) {
return $this->aValues[FormEvents::POST_SUBMIT];
}
if(array_key_exists(FormEvents::POST_SET_DATA, $this->aValues) ){
if (array_key_exists(FormEvents::POST_SET_DATA, $this->aValues)) {
return $this->aValues[FormEvents::POST_SET_DATA];
}
return null;
}