eee
This commit is contained in:
@@ -15,6 +15,9 @@ class ArrayProxy extends TypesProxy
|
||||
*/
|
||||
public function dispatch(object $form, string $field, mixed $value): bool
|
||||
{
|
||||
if (is_null($value) && !$this->allowsNull) {
|
||||
return false;
|
||||
}
|
||||
return $value == ($form->{$field} = $value);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@ class BoolProxy extends TypesProxy
|
||||
*/
|
||||
public function dispatch(object $form, string $field, mixed $value): bool
|
||||
{
|
||||
if (is_null($value) && !$this->allowsNull) {
|
||||
return false;
|
||||
}
|
||||
// TODO: Implement dispatch() method.
|
||||
if (in_array($value, ['false', 'true'])) {
|
||||
$form->{$field} = $value === 'true';
|
||||
|
||||
@@ -14,6 +14,9 @@ class FloatProxy extends TypesProxy
|
||||
*/
|
||||
public function dispatch(object $form, string $field, mixed $value): bool
|
||||
{
|
||||
if (is_null($value) && !$this->allowsNull) {
|
||||
return false;
|
||||
}
|
||||
return $value == ($form->{$field} = (float)$value);
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,9 @@ class IntProxy extends TypesProxy
|
||||
*/
|
||||
public function dispatch(object $form, string $field, mixed $value): bool
|
||||
{
|
||||
if (is_null($value) && !$this->allowsNull) {
|
||||
return false;
|
||||
}
|
||||
return $value == ($form->{$field} = (int)$value);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,9 @@ class MixedProxy extends TypesProxy
|
||||
public function dispatch(object $form, string $field, mixed $value): bool
|
||||
{
|
||||
try {
|
||||
if (is_null($value) && !$this->allowsNull) {
|
||||
return false;
|
||||
}
|
||||
return $value == ($form->{$field} = $value);
|
||||
} catch (\Throwable $throwable) {
|
||||
return false;
|
||||
|
||||
@@ -15,6 +15,9 @@ class StringProxy extends TypesProxy
|
||||
*/
|
||||
public function dispatch(object $form, string $field, mixed $value): bool
|
||||
{
|
||||
if (is_null($value) && !$this->allowsNull) {
|
||||
return false;
|
||||
}
|
||||
return $value == ($form->{$field} = (string)$value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user