Skip to content

Commit

Permalink
API Make validator param nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Dec 16, 2024
1 parent dc973c6 commit a1ae139
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Forms/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ class Form extends ModelData implements HasRequestHandler
protected $name;

/**
* @var Validator
* @var null|Validator
*/
protected $validator;
protected $validator = null;

/**
* @see setValidationResponseCallback()
Expand Down Expand Up @@ -635,7 +635,7 @@ public function transform(FormTransformation $trans)

/**
* Get the {@link Validator} attached to this form.
* @return Validator
* @return null|Validator
*/
public function getValidator()
{
Expand All @@ -644,10 +644,10 @@ public function getValidator()

/**
* Set the {@link Validator} on this form.
* @param Validator $validator
* @param null|Validator $validator
* @return $this
*/
public function setValidator(Validator $validator)
public function setValidator(?Validator $validator)
{
if ($validator) {
$this->validator = $validator;
Expand Down

0 comments on commit a1ae139

Please sign in to comment.