33 * Copyright © Magento, Inc. All rights reserved.
44 * See COPYING.txt for license details.
55 */
6-
76declare (strict_types=1 );
87
98namespace Magento \WebapiAsync \Model ;
109
10+ use Magento \AsynchronousOperations \Model \ConfigInterface ;
11+ use Magento \Framework \Exception \LocalizedException ;
12+ use Magento \Framework \Serialize \SerializerInterface ;
1113use Magento \Webapi \Model \Cache \Type \Webapi as WebapiCache ;
1214use Magento \Webapi \Model \Config as WebapiConfig ;
13- use Magento \Framework \App \ObjectManager ;
14- use Magento \Framework \Serialize \SerializerInterface ;
15- use Magento \Framework \Exception \LocalizedException ;
1615use Magento \Webapi \Model \Config \Converter ;
1716
1817/**
1918 * Class for accessing to Webapi_Async configuration.
2019 */
21- class Config implements \ Magento \ AsynchronousOperations \ Model \ ConfigInterface
20+ class Config implements ConfigInterface
2221{
2322 /**
24- * @var \Magento\Webapi\Model\Cache\Type\Webapi
23+ * @var WebapiCache
2524 */
2625 private $ cache ;
2726
2827 /**
29- * @var \Magento\Webapi\Model\Config
28+ * @var WebapiConfig
3029 */
3130 private $ webApiConfig ;
3231
3332 /**
34- * @var \Magento\Framework\Serialize\ SerializerInterface
33+ * @var SerializerInterface
3534 */
3635 private $ serializer ;
3736
@@ -43,18 +42,18 @@ class Config implements \Magento\AsynchronousOperations\Model\ConfigInterface
4342 /**
4443 * Initialize dependencies.
4544 *
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
4948 */
5049 public function __construct (
5150 WebapiCache $ cache ,
5251 WebapiConfig $ webApiConfig ,
53- SerializerInterface $ serializer = null
52+ SerializerInterface $ serializer
5453 ) {
5554 $ this ->cache = $ cache ;
5655 $ this ->webApiConfig = $ webApiConfig ;
57- $ this ->serializer = $ serializer ? : ObjectManager:: getInstance ()-> get (SerializerInterface::class) ;
56+ $ this ->serializer = $ serializer ;
5857 }
5958
6059 /**
0 commit comments