@@ -44,7 +44,7 @@ public function __construct(
44
44
}
45
45
46
46
/**
47
- * { @inheritdoc}
47
+ * @inheritdoc
48
48
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
49
49
*/
50
50
public function apply ()
@@ -66,8 +66,8 @@ public function apply()
66
66
', ' ,
67
67
$ eavSetup ->getAttribute (\Magento \Catalog \Model \Product::ENTITY , $ field , 'apply_to ' )
68
68
);
69
- if (!in_array (' bundle ' , $ applyTo )) {
70
- $ applyTo [] = ' bundle ' ;
69
+ if (!in_array (\ Magento \ Catalog \ Model \ Product \Type:: TYPE_BUNDLE , $ applyTo )) {
70
+ $ applyTo [] = \ Magento \ Catalog \ Model \ Product \Type:: TYPE_BUNDLE ;
71
71
$ eavSetup ->updateAttribute (
72
72
\Magento \Catalog \Model \Product::ENTITY ,
73
73
$ field ,
@@ -78,7 +78,7 @@ public function apply()
78
78
}
79
79
80
80
$ applyTo = explode (', ' , $ eavSetup ->getAttribute (\Magento \Catalog \Model \Product::ENTITY , 'cost ' , 'apply_to ' ));
81
- unset($ applyTo [array_search (' bundle ' , $ applyTo )]);
81
+ unset($ applyTo [array_search (\ Magento \ Catalog \ Model \ Product \Type:: TYPE_BUNDLE , $ applyTo )]);
82
82
$ eavSetup ->updateAttribute (\Magento \Catalog \Model \Product::ENTITY , 'cost ' , 'apply_to ' , implode (', ' , $ applyTo ));
83
83
84
84
/**
@@ -106,7 +106,7 @@ public function apply()
106
106
'visible_on_front ' => false ,
107
107
'used_in_product_listing ' => true ,
108
108
'unique ' => false ,
109
- 'apply_to ' => ' bundle '
109
+ 'apply_to ' => \ Magento \ Catalog \ Model \ Product \Type:: TYPE_BUNDLE
110
110
]
111
111
);
112
112
@@ -131,7 +131,7 @@ public function apply()
131
131
'comparable ' => false ,
132
132
'visible_on_front ' => false ,
133
133
'unique ' => false ,
134
- 'apply_to ' => ' bundle '
134
+ 'apply_to ' => \ Magento \ Catalog \ Model \ Product \Type:: TYPE_BUNDLE
135
135
]
136
136
);
137
137
@@ -157,7 +157,7 @@ public function apply()
157
157
'visible_on_front ' => false ,
158
158
'used_in_product_listing ' => true ,
159
159
'unique ' => false ,
160
- 'apply_to ' => ' bundle '
160
+ 'apply_to ' => \ Magento \ Catalog \ Model \ Product \Type:: TYPE_BUNDLE
161
161
]
162
162
);
163
163
@@ -184,7 +184,7 @@ public function apply()
184
184
'visible_on_front ' => false ,
185
185
'used_in_product_listing ' => true ,
186
186
'unique ' => false ,
187
- 'apply_to ' => ' bundle '
187
+ 'apply_to ' => \ Magento \ Catalog \ Model \ Product \Type:: TYPE_BUNDLE
188
188
]
189
189
);
190
190
@@ -210,29 +210,29 @@ public function apply()
210
210
'visible_on_front ' => false ,
211
211
'used_in_product_listing ' => true ,
212
212
'unique ' => false ,
213
- 'apply_to ' => ' bundle '
213
+ 'apply_to ' => \ Magento \ Catalog \ Model \ Product \Type:: TYPE_BUNDLE
214
214
]
215
215
);
216
216
}
217
217
218
218
/**
219
- * { @inheritdoc}
219
+ * @inheritdoc
220
220
*/
221
221
public static function getDependencies ()
222
222
{
223
223
return [];
224
224
}
225
225
226
226
/**
227
- * { @inheritdoc}
227
+ * @inheritdoc
228
228
*/
229
229
public static function getVersion ()
230
230
{
231
231
return '2.0.0 ' ;
232
232
}
233
233
234
234
/**
235
- * { @inheritdoc}
235
+ * @inheritdoc
236
236
*/
237
237
public function getAliases ()
238
238
{
0 commit comments