mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-03 08:37:53 +08:00
Add Container typehint to all service definitions
This commit is contained in:
parent
3d39f3b2a9
commit
cabcb7d9e4
8 changed files with 101 additions and 94 deletions
|
@ -9,18 +9,19 @@ declare(strict_types=1);
|
|||
|
||||
namespace WooCommerce\PayPalCommerce\AdminNotices;
|
||||
|
||||
use Psr\Container\ContainerInterface;
|
||||
use WooCommerce\PayPalCommerce\AdminNotices\Renderer\Renderer;
|
||||
use WooCommerce\PayPalCommerce\AdminNotices\Renderer\RendererInterface;
|
||||
use WooCommerce\PayPalCommerce\AdminNotices\Repository\Repository;
|
||||
use WooCommerce\PayPalCommerce\AdminNotices\Repository\RepositoryInterface;
|
||||
|
||||
return array(
|
||||
'admin-notices.renderer' => static function ( $container ): RendererInterface {
|
||||
'admin-notices.renderer' => static function ( ContainerInterface $container ): RendererInterface {
|
||||
|
||||
$repository = $container->get( 'admin-notices.repository' );
|
||||
return new Renderer( $repository );
|
||||
},
|
||||
'admin-notices.repository' => static function ( $container ): RepositoryInterface {
|
||||
'admin-notices.repository' => static function ( ContainerInterface $container ): RepositoryInterface {
|
||||
|
||||
return new Repository();
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue