Skip to content

Commit

Permalink
Validators::isValid(): Add return type where missing
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Aug 18, 2023
1 parent 335b407 commit d89f0e7
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/CallbackValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(callable $callback)
$this->callback = $callback;
}

public function isValid($value)
public function isValid($value): bool
{
// Multiple isValid() calls must not stack validation messages
$this->clearMessages();
Expand Down
2 changes: 1 addition & 1 deletion src/DateTimeValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(bool $local = true)
*
* @return bool
*/
public function isValid($value)
public function isValid($value): bool
{
// Multiple isValid() calls must not stack validation messages
$this->clearMessages();
Expand Down
2 changes: 1 addition & 1 deletion src/FileValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public function setMaxFileNameLength(?int $maxFileNameLength): self
* @param UploadedFileInterface|UploadedFileInterface[] $value
* @return bool
*/
public function isValid($value)
public function isValid($value): bool
{
// Multiple isValid() calls must not stack validation messages
$this->clearMessages();
Expand Down
2 changes: 1 addition & 1 deletion src/GreaterThanValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function setMin($min): self
*
* @return bool
*/
public function isValid($value)
public function isValid($value): bool
{
// Multiple isValid() calls must not stack validation messages
$this->clearMessages();
Expand Down
2 changes: 1 addition & 1 deletion src/HostnameValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class HostnameValidator extends BaseValidator
*
* @return boolean
*/
public function isValid($value)
public function isValid($value): bool
{
$this->clearMessages();

Expand Down
2 changes: 1 addition & 1 deletion src/InArrayValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function setStrict(bool $strict = true): self
return $this;
}

public function isValid($value)
public function isValid($value): bool
{
// Multiple isValid() calls must not stack validation messages
$this->clearMessages();
Expand Down
2 changes: 1 addition & 1 deletion src/LessThanValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function setMax($max): self
*
* @return bool
*/
public function isValid($value)
public function isValid($value): bool
{
// Multiple isValid() calls must not stack validation messages
$this->clearMessages();
Expand Down
2 changes: 1 addition & 1 deletion src/ValidatorChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public function getIterator(): Traversable
return clone $this->validators;
}

public function isValid($value)
public function isValid($value): bool
{
$this->clearMessages();

Expand Down
2 changes: 1 addition & 1 deletion src/X509CertValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class X509CertValidator extends BaseValidator
* @param String $value
* @return bool
*/
public function isValid($value)
public function isValid($value): bool
{
// Multiple isValid() calls must not stack validation messages
$this->clearMessages();
Expand Down

0 comments on commit d89f0e7

Please sign in to comment.