File tree Expand file tree Collapse file tree 4 files changed +15
-11
lines changed
Expand file tree Collapse file tree 4 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 44
55use Micro \Plugin \Redis \Configuration \ClientOptionsConfigurationInterface ;
66use Micro \Plugin \Redis \Configuration \RedisClientConfigurationInterface ;
7- use Micro \Plugin \Redis \RedisPluginConfiguration ;
7+ use Micro \Plugin \Redis \RedisPluginConfigurationInterface ;
88use \Redis ;
99
1010class RedisBuilder implements RedisBuilderInterface
1111{
1212 /**
13- * @param RedisPluginConfiguration $pluginConfiguration
13+ * @param RedisPluginConfigurationInterface $pluginConfiguration
1414 * @param RedisFactoryInterface $redisFactory
1515 */
1616 public function __construct (
17- private RedisPluginConfiguration $ pluginConfiguration ,
17+ private RedisPluginConfigurationInterface $ pluginConfiguration ,
1818 private RedisFactoryInterface $ redisFactory
1919 )
2020 {
Original file line number Diff line number Diff line change 22
33namespace Micro \Plugin \Redis \Business \Redis ;
44
5- use Micro \Plugin \Redis \RedisPluginConfiguration ;
5+ use Micro \Plugin \Redis \RedisPluginConfigurationInterface ;
66
77class RedisBuilderFactory implements RedisBuilderFactoryInterface
88{
99 /**
10- * @param RedisPluginConfiguration $configuration
10+ * @param RedisPluginConfigurationInterface $configuration
1111 * @param RedisFactoryInterface $redisFactory
1212 */
1313 public function __construct (
14- private RedisPluginConfiguration $ configuration ,
14+ private RedisPluginConfigurationInterface $ configuration ,
1515 private RedisFactoryInterface $ redisFactory
1616 )
1717 {
Original file line number Diff line number Diff line change 33namespace Micro \Plugin \Redis ;
44
55use Micro \Component \DependencyInjection \Container ;
6- use Micro \Framework \Kernel \Configuration \PluginConfiguration ;
76use Micro \Framework \Kernel \Plugin \AbstractPlugin ;
87use Micro \Plugin \Redis \Business \Redis \RedisBuilderFactory ;
98use Micro \Plugin \Redis \Business \Redis \RedisBuilderFactoryInterface ;
1211use Micro \Plugin \Redis \Business \Redis \RedisManager ;
1312use Micro \Plugin \Redis \Business \Redis \RedisManagerInterface ;
1413
14+ /**
15+ * @method RedisPluginConfigurationInterface configuration()
16+ */
1517class RedisPlugin extends AbstractPlugin
1618{
1719 /**
@@ -46,7 +48,7 @@ protected function createRedisManager(): RedisManagerInterface
4648 protected function createRedisBuilderFactory (): RedisBuilderFactoryInterface
4749 {
4850 return new RedisBuilderFactory (
49- $ this ->configuration ,
51+ $ this ->configuration () ,
5052 $ this ->createRedisFactory ()
5153 );
5254 }
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class RedisPluginConfiguration extends PluginConfiguration implements RedisPlugi
1414 public const CLIENT_DEFAULT = 'default ' ;
1515
1616 /**
17- * @return string[]
17+ * {@inheritDoc}
1818 */
1919 public function getClientList (): array
2020 {
@@ -31,8 +31,10 @@ public function getClientConfiguration(string $clientName): RedisClientConfigura
3131 {
3232 if (!in_array ($ clientName , $ this ->getClientList (), true )) {
3333 throw new \InvalidArgumentException (
34- 'Redis client is not defined in the environment file. Please, append connection id to "%s" ' ,
35- self ::CFG_CLIENT_LIST
34+ sprintf (
35+ 'Redis client is not defined in the environment file. Please, append connection id to "%s" ' ,
36+ self ::CFG_CLIENT_LIST
37+ )
3638 );
3739 }
3840
You can’t perform that action at this time.
0 commit comments