更新 'src/Listener/ValidatorFactoryResolvedListener.php'

This commit is contained in:
zyimm 2022-03-08 09:40:23 +00:00
parent 131f747f71
commit 0bcd8b73ab

View File

@ -1,13 +1,7 @@
<?php
declare(strict_types=1);
/**
* This file is part of hyperf-ext/captcha.
*
* @link https://github.com/hyperf-ext/captcha
* @contact eric@zhu.email
* @license https://github.com/hyperf-ext/captcha/blob/master/LICENSE
*/
namespace Zyimm\Captcha\Listener;
use Hyperf\Event\Contract\ListenerInterface;
@ -26,7 +20,7 @@ class ValidatorFactoryResolvedListener implements ListenerInterface
public function process(object $event)
{
/** @var \Hyperf\Validation\Contract\ValidatorFactoryInterface $validatorFactory */
$validatorFactory = $event->validatorFactory;
$validatorFactory->extend('captcha', function ($attribute, $value, $parameters, $validator) {