Fixed null exception

Change-Id: I3f217607646d7fbc6895f7f353de588669268240
Signed-off-by: smarcet <smarcet@gmail.com>
This commit is contained in:
smarcet 2020-03-27 11:09:10 -03:00
parent b8e66009f5
commit 87c4eba4fa
2 changed files with 4 additions and 4 deletions

View File

@ -107,9 +107,9 @@ abstract class DoctrineAsymmetricKeyRepository
* @param string $usage
* @param string $alg
* @param int|null $owner_id
* @return AsymmetricKey
* @return AsymmetricKey|null
*/
public function getActiveByCriteria(string $type, string $usage, string $alg, int $owner_id = null): AsymmetricKey
public function getActiveByCriteria(string $type, string $usage, string $alg, int $owner_id = null): ?AsymmetricKey
{
try {
$now = new \DateTime('now', new \DateTimeZone('UTC'));

View File

@ -46,8 +46,8 @@ interface IAsymmetricKeyRepository extends IBaseRepository
* @param string $usage
* @param string $alg
* @param int|null $owner_id
* @return AsymmetricKey
* @return AsymmetricKey|null
*/
public function getActiveByCriteria(string $type, string $usage, string $alg, int $owner_id = null):AsymmetricKey;
public function getActiveByCriteria(string $type, string $usage, string $alg, int $owner_id = null):?AsymmetricKey;
}