3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
-
7
6
declare (strict_types=1 );
8
7
9
8
namespace Magento \WebapiAsync \Model ;
10
9
10
+ use Magento \AsynchronousOperations \Model \ConfigInterface ;
11
+ use Magento \Framework \Exception \LocalizedException ;
12
+ use Magento \Framework \Serialize \SerializerInterface ;
11
13
use Magento \Webapi \Model \Cache \Type \Webapi as WebapiCache ;
12
14
use Magento \Webapi \Model \Config as WebapiConfig ;
13
- use Magento \Framework \App \ObjectManager ;
14
- use Magento \Framework \Serialize \SerializerInterface ;
15
- use Magento \Framework \Exception \LocalizedException ;
16
15
use Magento \Webapi \Model \Config \Converter ;
17
16
18
17
/**
19
18
* Class for accessing to Webapi_Async configuration.
20
19
*/
21
- class Config implements \ Magento \ AsynchronousOperations \ Model \ ConfigInterface
20
+ class Config implements ConfigInterface
22
21
{
23
22
/**
24
- * @var \Magento\Webapi\Model\Cache\Type\Webapi
23
+ * @var WebapiCache
25
24
*/
26
25
private $ cache ;
27
26
28
27
/**
29
- * @var \Magento\Webapi\Model\Config
28
+ * @var WebapiConfig
30
29
*/
31
30
private $ webApiConfig ;
32
31
33
32
/**
34
- * @var \Magento\Framework\Serialize\ SerializerInterface
33
+ * @var SerializerInterface
35
34
*/
36
35
private $ serializer ;
37
36
@@ -43,18 +42,18 @@ class Config implements \Magento\AsynchronousOperations\Model\ConfigInterface
43
42
/**
44
43
* Initialize dependencies.
45
44
*
46
- * @param \Magento\Webapi\Model\Cache\Type\Webapi $cache
47
- * @param \Magento\Webapi\Model\Config $webApiConfig
48
- * @param \Magento\Framework\Serialize\ SerializerInterface|null $serializer
45
+ * @param WebapiCache $cache
46
+ * @param WebapiConfig $webApiConfig
47
+ * @param SerializerInterface $serializer
49
48
*/
50
49
public function __construct (
51
50
WebapiCache $ cache ,
52
51
WebapiConfig $ webApiConfig ,
53
- SerializerInterface $ serializer = null
52
+ SerializerInterface $ serializer
54
53
) {
55
54
$ this ->cache = $ cache ;
56
55
$ this ->webApiConfig = $ webApiConfig ;
57
- $ this ->serializer = $ serializer ? : ObjectManager:: getInstance ()-> get (SerializerInterface::class) ;
56
+ $ this ->serializer = $ serializer ;
58
57
}
59
58
60
59
/**
0 commit comments