File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
app/code/Magento/CatalogInventory/Block/Plugin Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 7
7
8
8
use Magento \Catalog \Block \Product \View ;
9
9
use Magento \CatalogInventory \Model \Product \QuantityValidator ;
10
- use Magento \Framework \App \ObjectManager ;
11
10
12
11
class ProductView
13
12
{
@@ -17,14 +16,12 @@ class ProductView
17
16
private $ productQuantityValidator ;
18
17
19
18
/**
20
- * @param QuantityValidator|null $productQuantityValidator
19
+ * @param QuantityValidator $productQuantityValidator
21
20
*/
22
21
public function __construct (
23
- QuantityValidator $ productQuantityValidator = null
22
+ QuantityValidator $ productQuantityValidator
24
23
) {
25
- $ this ->productQuantityValidator = $ productQuantityValidator ?? ObjectManager::getInstance ()->get (
26
- QuantityValidator::class
27
- );
24
+ $ this ->productQuantityValidator = $ productQuantityValidator ;
28
25
}
29
26
30
27
/**
You can’t perform that action at this time.
0 commit comments