diff --git a/publish/hashing.php b/publish/hashing.php index f9adf67..a5c9a3d 100644 --- a/publish/hashing.php +++ b/publish/hashing.php @@ -8,6 +8,9 @@ * @contact eric@zhu.email * @license https://github.com/hyperf-ext/hashing/blob/master/LICENSE */ + +use function Hyperf\Support\env; + return [ /* |-------------------------------------------------------------------------- @@ -37,7 +40,7 @@ 'bcrypt' => [ 'class' => \HyperfExt\Hashing\Driver\BcryptDriver::class, 'options' => [ - 'rounds' => env('BCRYPT_ROUNDS', 10), + 'rounds' => (int) env('BCRYPT_ROUNDS', 10), ], ], diff --git a/src/HashManager.php b/src/HashManager.php index 3b7b591..37e2ca3 100644 --- a/src/HashManager.php +++ b/src/HashManager.php @@ -15,6 +15,7 @@ use HyperfExt\Hashing\Contract\HashInterface; use HyperfExt\Hashing\Driver\BcryptDriver; use InvalidArgumentException; +use function Hyperf\Support\make; class HashManager implements HashInterface {