File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
app/code/Magento/Sales/Model/Order Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ public function __construct(
68
68
}
69
69
70
70
/**
71
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
72
+ *
71
73
* @param OrderInterface $order
72
74
* @param ShipmentItemCreationInterface[] $items
73
75
* @param ShipmentTrackCreationInterface[] $tracks
@@ -97,7 +99,9 @@ public function create(
97
99
$ shipmentItems
98
100
);
99
101
100
- $ this ->extensionAttributesProcessor ->execute ($ shipment , $ arguments );
102
+ if (null !== $ arguments ) {
103
+ $ this ->extensionAttributesProcessor ->execute ($ shipment , $ arguments );
104
+ }
101
105
102
106
foreach ($ tracks as $ track ) {
103
107
$ hydrator = $ this ->hydratorPool ->getHydrator (
Original file line number Diff line number Diff line change @@ -48,11 +48,8 @@ public function __construct(
48
48
*/
49
49
public function execute (
50
50
ShipmentInterface $ shipment ,
51
- ShipmentCreationArgumentsInterface $ arguments = null
51
+ ShipmentCreationArgumentsInterface $ arguments
52
52
): void {
53
- if (null === $ arguments ) {
54
- return ;
55
- }
56
53
$ shipmentExtensionAttributes = [];
57
54
if (null !== $ shipment ->getExtensionAttributes ()) {
58
55
$ shipmentExtensionAttributes = $ this ->extensionAttributesProcessor ->buildOutputDataArray (
You can’t perform that action at this time.
0 commit comments