From 7dfe650d24e67d32bc14c215b8e8828b3424d7c1 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 14 Apr 2022 20:53:43 -0700 Subject: [PATCH] (REF) CryptoRegistry - Tighten type declaration --- Civi/Core/Container.php | 2 +- Civi/Crypto/CryptoRegistry.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Civi/Core/Container.php b/Civi/Core/Container.php index 92c9a9482d..2c940faf46 100644 --- a/Civi/Core/Container.php +++ b/Civi/Core/Container.php @@ -232,7 +232,7 @@ class Container { $container->setDefinition('pear_mail', new Definition('Mail')) ->setFactory('CRM_Utils_Mail::createMailer')->setPublic(TRUE); - $container->setDefinition('crypto.registry', new Definition('Civi\Crypto\CryptoService')) + $container->setDefinition('crypto.registry', new Definition('Civi\Crypto\CryptoRegistry')) ->setFactory('Civi\Crypto\CryptoRegistry::createDefaultRegistry')->setPublic(TRUE); $container->setDefinition('crypto.token', new Definition('Civi\Crypto\CryptoToken', [])) diff --git a/Civi/Crypto/CryptoRegistry.php b/Civi/Crypto/CryptoRegistry.php index 27f0a9de8f..5c6fd958da 100644 --- a/Civi/Crypto/CryptoRegistry.php +++ b/Civi/Crypto/CryptoRegistry.php @@ -61,7 +61,7 @@ class CryptoRegistry { * @throws \CRM_Core_Exception * @throws \Civi\Crypto\Exception\CryptoException */ - public static function createDefaultRegistry() { + public static function createDefaultRegistry(): CryptoRegistry { $registry = new static(); $registry->addCipherSuite(new \Civi\Crypto\PhpseclibCipherSuite()); -- 2.25.1