Skip to content

Commit

Permalink
[BUGFIX] Fix parameter type
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-meyer authored Oct 8, 2024
1 parent f63c93d commit b9fdb49
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Classes/Validation/AbstractDlfValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Psr\Log\LoggerAwareTrait;
use TYPO3\CMS\Core\Log\LogManager;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Error\Result;
use TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator;

/**
Expand All @@ -45,7 +46,12 @@ public function __construct(string $valueClassName)
$this->valueClassName = $valueClassName;
}

public function validate($value)
/**
* @param mixed $value The value to validate
*
* @return Result
*/
public function validate(mixed $value): Result
{
if (!$value instanceof $this->valueClassName) {
$this->logger->debug('Value must be an instance of ' . $this->valueClassName . '.');
Expand Down

0 comments on commit b9fdb49

Please sign in to comment.