File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed
app/code/Magento/CatalogInventoryGraphQl/Model Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \CatalogInventoryGraphQl \Model \Resolver ;
9
9
10
- use Magento \Framework \GraphQl \Query \Resolver \ContextInterface ;
11
10
use Magento \Framework \GraphQl \Schema \Type \ResolveInfo ;
12
11
use Magento \Framework \GraphQl \Config \Element \Field ;
13
12
use Magento \Framework \GraphQl \Query \ResolverInterface ;
@@ -38,12 +37,12 @@ public function __construct(
38
37
*/
39
38
public function resolve (
40
39
Field $ field ,
41
- ContextInterface $ context ,
40
+ $ context ,
42
41
ResolveInfo $ info ,
43
- ?array $ value ,
44
- ?array $ args
42
+ ?array $ value = null ,
43
+ ?array $ args = null
45
44
) {
46
45
$ stockItem = $ this ->stockItemService ->getStockItem ($ value ['model ' ]);
47
- return $ stockItem ? $ stockItem ->getMaxSaleQty () : null ;
46
+ return $ stockItem? ->getMaxSaleQty();
48
47
}
49
48
}
Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \CatalogInventoryGraphQl \Model \Resolver ;
9
9
10
- use Magento \Framework \GraphQl \Query \Resolver \ContextInterface ;
11
10
use Magento \Framework \GraphQl \Schema \Type \ResolveInfo ;
12
11
use Magento \Framework \GraphQl \Config \Element \Field ;
13
12
use Magento \Framework \GraphQl \Query \ResolverInterface ;
@@ -38,12 +37,12 @@ public function __construct(
38
37
*/
39
38
public function resolve (
40
39
Field $ field ,
41
- ContextInterface $ context ,
40
+ $ context ,
42
41
ResolveInfo $ info ,
43
- ?array $ value ,
44
- ?array $ args
42
+ ?array $ value = null ,
43
+ ?array $ args = null
45
44
) {
46
45
$ stockItem = $ this ->stockItemService ->getStockItem ($ value ['model ' ]);
47
- return $ stockItem ? $ stockItem ->getMinSaleQty () : null ;
46
+ return $ stockItem? ->getMinSaleQty();
48
47
}
49
48
}
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public function __construct(
49
49
* Returns stock item if the product is available
50
50
*
51
51
* @param Product|null $product
52
- * @return Item
52
+ * @return Item|null
53
53
*/
54
54
public function getStockItem (?Product $ product )
55
55
{
You can’t perform that action at this time.
0 commit comments