From a20fd2278fcaf3fe408f6e891cf44b49d4ae4528 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Wed, 16 Dec 2020 08:06:53 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B03537=20Code=20review=20Thanks=20@Molkoba?= =?UTF-8?q?in=20!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/run_query.php | 3 ++- .../UI/Base/Component/Input/AbstractInput.php | 14 ++++++++++++-- .../application/UI/Base/Component/Input/Input.php | 8 +++++++- .../UI/Base/Component/Input/TextArea.php | 14 ++++++++++++-- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/pages/run_query.php b/pages/run_query.php index 410e5522b..bde36da63 100644 --- a/pages/run_query.php +++ b/pages/run_query.php @@ -18,6 +18,7 @@ */ use Combodo\iTop\Application\UI\Base\Component\Button\ButtonFactory; +use Combodo\iTop\Application\UI\Base\Component\Form\Form; use Combodo\iTop\Application\UI\Base\Component\Html\Html; use Combodo\iTop\Application\UI\Base\Component\Input\InputFactory; @@ -153,7 +154,7 @@ try } } - $oQueryForm = new \Combodo\iTop\Application\UI\Base\Component\Form\Form(); + $oQueryForm = new Form(); $oP->AddUiBlock($oQueryForm); $oHiddenParams = new Html($oAppContext->GetForForm()); diff --git a/sources/application/UI/Base/Component/Input/AbstractInput.php b/sources/application/UI/Base/Component/Input/AbstractInput.php index 66dda5462..de061af24 100644 --- a/sources/application/UI/Base/Component/Input/AbstractInput.php +++ b/sources/application/UI/Base/Component/Input/AbstractInput.php @@ -24,7 +24,12 @@ class AbstractInput extends UIBlock return $this->sName; } - public function SetName(string $sName): AbstractInput + /** + * @param string $sName + * + * @return $this + */ + public function SetName(string $sName) { $this->sName = $sName; @@ -36,7 +41,12 @@ class AbstractInput extends UIBlock return $this->sValue; } - public function SetValue(?string $sValue): AbstractInput + /** + * @param string|null $sValue + * + * @return $this + */ + public function SetValue(?string $sValue) { $this->sValue = $sValue; diff --git a/sources/application/UI/Base/Component/Input/Input.php b/sources/application/UI/Base/Component/Input/Input.php index df3bcb9fc..362868aa6 100644 --- a/sources/application/UI/Base/Component/Input/Input.php +++ b/sources/application/UI/Base/Component/Input/Input.php @@ -28,9 +28,15 @@ class Input extends AbstractInput return $this->sType; } - public function SetType(string $sType): Input + /** + * @param string $sType + * + * @return $this + */ + public function SetType(string $sType) { $this->sType = $sType; + return $this; } } \ No newline at end of file diff --git a/sources/application/UI/Base/Component/Input/TextArea.php b/sources/application/UI/Base/Component/Input/TextArea.php index a1f984d49..f0f7b80bf 100644 --- a/sources/application/UI/Base/Component/Input/TextArea.php +++ b/sources/application/UI/Base/Component/Input/TextArea.php @@ -35,7 +35,12 @@ class TextArea extends AbstractInput return $this->iCols; } - public function SetCols(int $iCols): TextArea + /** + * @param int $iCols + * + * @return $this + */ + public function SetCols(int $iCols) { $this->iCols = $iCols; @@ -47,7 +52,12 @@ class TextArea extends AbstractInput return $this->iRows; } - public function SetRows(int $iRows): TextArea + /** + * @param int $iRows + * + * @return $this + */ + public function SetRows(int $iRows) { $this->iRows = $iRows;