Skip to content

Commit 8b7aa7e

Browse files
authored
magento-engcom/magento2ce#3173: Static call eliminated
1 parent a5a07b8 commit 8b7aa7e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/code/Magento/Widget/Model/DeleteWidgetById.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ private function getWidgetById(int $instanceId): WidgetInstance
6868
$this->resourceModel->load($widgetInstance, $instanceId);
6969

7070
if (!$widgetInstance->getId()) {
71-
throw NoSuchEntityException::singleField('instance_id', $instanceId);
71+
throw new NoSuchEntityException(
72+
__(
73+
'No such entity with instance_id = %instance_id',
74+
['instance_id' => $instanceId]
75+
)
76+
);
7277
}
7378

7479
return $widgetInstance;

0 commit comments

Comments
 (0)