Fixes EncryptionException::forNoHandlerAvailable() handler parameter call

This commit is contained in:
Abdul Malik Ikhsan 2020-08-16 15:30:15 +07:00
parent 6af3481345
commit bbea2f316e
No known key found for this signature in database
GPG Key ID: 23FCCC74D1442CAE
2 changed files with 10 additions and 3 deletions

View File

@ -87,6 +87,13 @@ class Encryption
'OpenSSL',
];
/**
* Handlers that are to be installed
*
* @var array
*/
protected $handlers = [];
// --------------------------------------------------------------------
/**
@ -115,7 +122,7 @@ class Encryption
{
// this should never happen in travis-ci
// @codeCoverageIgnoreStart
throw EncryptionException::forNoHandlerAvailable($this->driver);
throw EncryptionException::forNoHandlerAvailable('OpenSSL');
// @codeCoverageIgnoreEnd
}
}

View File

@ -14,9 +14,9 @@ class EncryptionException extends \RuntimeException implements ExceptionInterfac
return new static(lang('Encryption.noDriverRequested'));
}
public static function forNoHandlerAvailable()
public static function forNoHandlerAvailable(string $handler)
{
return new static(lang('Encryption.noHandlerAvailable'));
return new static(lang('Encryption.noHandlerAvailable', [$handler]));
}
public static function forUnKnownHandler(string $driver = null)