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(
6868 }
6969
7070 /**
71+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
72+ *
7173 * @param OrderInterface $order
7274 * @param ShipmentItemCreationInterface[] $items
7375 * @param ShipmentTrackCreationInterface[] $tracks
@@ -97,7 +99,9 @@ public function create(
9799 $ shipmentItems
98100 );
99101
100- $ this ->extensionAttributesProcessor ->execute ($ shipment , $ arguments );
102+ if (null !== $ arguments ) {
103+ $ this ->extensionAttributesProcessor ->execute ($ shipment , $ arguments );
104+ }
101105
102106 foreach ($ tracks as $ track ) {
103107 $ hydrator = $ this ->hydratorPool ->getHydrator (
Original file line number Diff line number Diff line change @@ -48,11 +48,8 @@ public function __construct(
4848 */
4949 public function execute (
5050 ShipmentInterface $ shipment ,
51- ShipmentCreationArgumentsInterface $ arguments = null
51+ ShipmentCreationArgumentsInterface $ arguments
5252 ): void {
53- if (null === $ arguments ) {
54- return ;
55- }
5653 $ shipmentExtensionAttributes = [];
5754 if (null !== $ shipment ->getExtensionAttributes ()) {
5855 $ shipmentExtensionAttributes = $ this ->extensionAttributesProcessor ->buildOutputDataArray (
You can’t perform that action at this time.
0 commit comments