Code cleanup

SVN:trunk[5973]
This commit is contained in:
Guillaume Lajarige
2018-07-25 07:23:52 +00:00
parent d0322b471d
commit e71ad536a9
15 changed files with 102 additions and 71 deletions

View File

@@ -19,6 +19,8 @@
namespace Combodo\iTop\Form\Field;
use Closure;
/**
* A field for Dates and Date & Times, supporting custom formats
*/
@@ -32,7 +34,7 @@ class DateTimeField extends StringField
* Overloaded constructor
*
* @param string $sId
* @param Closure $onFinalizeCallback (Used in the $oForm->AddField($sId, ..., function() use ($oManager, $oForm, '...') { ... } ); )
* @param \Closure $onFinalizeCallback (Used in the $oForm->AddField($sId, ..., function() use ($oManager, $oForm, '...') { ... } ); )
*/
public function __construct($sId, Closure $onFinalizeCallback = null)
{
@@ -52,13 +54,13 @@ class DateTimeField extends StringField
/**
*
* @param string $sDateTimeFormat
* @param string $sPHPDateTimeFormat
*
* @return \Combodo\iTop\Form\Field\DateTimeField
*/
public function SetPHPDateTimeFormat($sDateTimeFormat)
public function SetPHPDateTimeFormat($sPHPDateTimeFormat)
{
$this->sPHPDateTimeFormat = $sDateTimeFormat;
$this->sPHPDateTimeFormat = $sPHPDateTimeFormat;
return $this;
}
@@ -68,18 +70,18 @@ class DateTimeField extends StringField
*/
public function GetJSDateTimeFormat()
{
return $this->sDateTimeFormat;
return $this->sJSDateTimeFormat;
}
/**
*
* @param string $sDateTimeFormat
* @param string $sJSDateTimeFormat
*
* @return \Combodo\iTop\Form\Field\DateTimeField
*/
public function SetJSDateTimeFormat($sDateTimeFormat)
public function SetJSDateTimeFormat($sJSDateTimeFormat)
{
$this->sDateTimeFormat = $sDateTimeFormat;
$this->sJSDateTimeFormat = $sJSDateTimeFormat;
return $this;
}

View File

@@ -113,7 +113,7 @@ abstract class MultipleChoicesField extends Field
{
if (array_key_exists($value, $this->currentValue))
{
unset($this->currentValue[$sId]);
unset($this->currentValue[$value]);
}
return $this;
}

View File

@@ -19,7 +19,6 @@
namespace Combodo\iTop\Form\Field;
use \Combodo\iTop\Form\Field\TextField;
class StringField extends TextField
{

View File

@@ -20,6 +20,7 @@
namespace Combodo\iTop\Form\Field;
use Str;
use Closure;
/**
* Description of UrlField
@@ -36,7 +37,7 @@ class UrlField extends StringField
* Default constructor
*
* @param string $sId
* @param Closure $onFinalizeCallback (Used in the $oForm->AddField($sId, ..., function() use ($oManager, $oForm, '...') { ... } ); )
* @param \Closure $onFinalizeCallback (Used in the $oForm->AddField($sId, ..., function() use ($oManager, $oForm, '...') { ... } ); )
*/
public function __construct($sId, Closure $onFinalizeCallback = null)
{