5
5
*/
6
6
namespace Magento \Catalog \Model \Product ;
7
7
8
+ use Magento \Catalog \Api \Data \ProductInterface ;
8
9
use Magento \Catalog \Model \Product ;
10
+ use Magento \Catalog \Model \Product \Type \AbstractType ;
11
+ use Magento \Catalog \Model \Product \Type \Pool ;
12
+ use Magento \Catalog \Model \Product \Type \Price ;
13
+ use Magento \Catalog \Model \Product \Type \Price \Factory as PriceFactory ;
14
+ use Magento \Catalog \Model \Product \Type \Simple ;
15
+ use Magento \Catalog \Model \ProductTypes \ConfigInterface ;
9
16
use Magento \Framework \Data \OptionSourceInterface ;
17
+ use Magento \Framework \Pricing \PriceInfo \Factory as PriceInfoFactory ;
18
+ use Magento \Framework \Pricing \PriceInfoInterface ;
10
19
11
20
/**
12
21
* Product type model
@@ -34,15 +43,15 @@ class Type implements OptionSourceInterface
34
43
/**
35
44
* Default product type model
36
45
*/
37
- const DEFAULT_TYPE_MODEL = \ Magento \ Catalog \ Model \ Product \ Type \ Simple::class;
46
+ const DEFAULT_TYPE_MODEL = Simple::class;
38
47
39
48
/**
40
49
* Default price model
41
50
*/
42
- const DEFAULT_PRICE_MODEL = \ Magento \ Catalog \ Model \ Product \ Type \ Price::class;
51
+ const DEFAULT_PRICE_MODEL = Price::class;
43
52
44
53
/**
45
- * @var \Magento\Catalog\Model\ProductTypes\ ConfigInterface
54
+ * @var ConfigInterface
46
55
*/
47
56
protected $ _config ;
48
57
@@ -77,35 +86,35 @@ class Type implements OptionSourceInterface
77
86
/**
78
87
* Product type factory
79
88
*
80
- * @var \Magento\Catalog\Model\Product\Type\ Pool
89
+ * @var Pool
81
90
*/
82
91
protected $ _productTypePool ;
83
92
84
93
/**
85
94
* Price model factory
86
95
*
87
- * @var \Magento\Catalog\Model\Product\Type\Price\Factory
96
+ * @var PriceFactory
88
97
*/
89
98
protected $ _priceFactory ;
90
99
91
100
/**
92
- * @var \Magento\Framework\Pricing\PriceInfo\Factory
101
+ * @var PriceInfoFactory
93
102
*/
94
103
protected $ _priceInfoFactory ;
95
104
96
105
/**
97
106
* Construct
98
107
*
99
- * @param \Magento\Catalog\Model\ProductTypes\ ConfigInterface $config
100
- * @param \Magento\Catalog\Model\Product\Type\ Pool $productTypePool
101
- * @param \Magento\Catalog\Model\Product\Type\Price\Factory $priceFactory
102
- * @param \Magento\Framework\Pricing\PriceInfo\Factory $priceInfoFactory
108
+ * @param ConfigInterface $config
109
+ * @param Pool $productTypePool
110
+ * @param PriceFactory $priceFactory
111
+ * @param PriceInfoFactory $priceInfoFactory
103
112
*/
104
113
public function __construct (
105
- \ Magento \ Catalog \ Model \ ProductTypes \ ConfigInterface $ config ,
106
- \ Magento \ Catalog \ Model \ Product \ Type \ Pool $ productTypePool ,
107
- \ Magento \ Catalog \ Model \ Product \ Type \ Price \ Factory $ priceFactory ,
108
- \ Magento \ Framework \ Pricing \ PriceInfo \ Factory $ priceInfoFactory
114
+ ConfigInterface $ config ,
115
+ Pool $ productTypePool ,
116
+ PriceFactory $ priceFactory ,
117
+ PriceInfoFactory $ priceInfoFactory
109
118
) {
110
119
$ this ->_config = $ config ;
111
120
$ this ->_productTypePool = $ productTypePool ;
@@ -116,8 +125,8 @@ public function __construct(
116
125
/**
117
126
* Factory to product singleton product type instances
118
127
*
119
- * @param \Magento\Catalog\Api\Data\ ProductInterface $product
120
- * @return \Magento\Catalog\Model\Product\Type\ AbstractType
128
+ * @param ProductInterface $product
129
+ * @return AbstractType
121
130
*/
122
131
public function factory ($ product )
123
132
{
@@ -139,8 +148,8 @@ public function factory($product)
139
148
/**
140
149
* Product type price model factory
141
150
*
142
- * @param string $productType
143
- * @return \Magento\Catalog\Model\Product\Type\ Price
151
+ * @param string $productType
152
+ * @return Price
144
153
*/
145
154
public function priceFactory ($ productType )
146
155
{
@@ -164,7 +173,7 @@ public function priceFactory($productType)
164
173
* Get Product Price Info object
165
174
*
166
175
* @param Product $saleableItem
167
- * @return \Magento\Framework\Pricing\ PriceInfoInterface
176
+ * @return PriceInfoInterface
168
177
*/
169
178
public function getPriceInfo (Product $ saleableItem )
170
179
{
0 commit comments