12
12
use Magento \Framework \DataObject ;
13
13
14
14
/**
15
+ * Provides functionality for stock state information
16
+ *
15
17
* Interface StockState
16
18
*/
17
19
class StockState implements StockStateInterface
@@ -32,6 +34,8 @@ class StockState implements StockStateInterface
32
34
protected $ stockConfiguration ;
33
35
34
36
/**
37
+ * StockState constructor
38
+ *
35
39
* @param StockStateProviderInterface $stockStateProvider
36
40
* @param StockRegistryProviderInterface $stockRegistryProvider
37
41
* @param StockConfigurationInterface $stockConfiguration
@@ -47,6 +51,8 @@ public function __construct(
47
51
}
48
52
49
53
/**
54
+ * Verify stock by product id
55
+ *
50
56
* @param int $productId
51
57
* @param int $scopeId
52
58
* @return bool
@@ -60,6 +66,8 @@ public function verifyStock($productId, $scopeId = null)
60
66
}
61
67
62
68
/**
69
+ * Verify notification by product id
70
+ *
63
71
* @param int $productId
64
72
* @param int $scopeId
65
73
* @return bool
@@ -90,8 +98,7 @@ public function checkQty($productId, $qty, $scopeId = null)
90
98
}
91
99
92
100
/**
93
- * Returns suggested qty that satisfies qty increments and minQty/maxQty/minSaleQty/maxSaleQty conditions
94
- * or original qty if such value does not exist
101
+ * Returns suggested qty that satisfies qty increments/minQty/maxQty/minSaleQty/maxSaleQty conditions else original qty
95
102
*
96
103
* @param int $productId
97
104
* @param float $qty
@@ -122,6 +129,8 @@ public function getStockQty($productId, $scopeId = null)
122
129
}
123
130
124
131
/**
132
+ * Check qty increments by product id
133
+ *
125
134
* @param int $productId
126
135
* @param float $qty
127
136
* @param int $websiteId
@@ -136,6 +145,8 @@ public function checkQtyIncrements($productId, $qty, $websiteId = null)
136
145
}
137
146
138
147
/**
148
+ * Check quote item qty
149
+ *
139
150
* @param int $productId
140
151
* @param float $itemQty
141
152
* @param float $qtyToCheck
0 commit comments