Skip to content

Commit 8746079

Browse files
#20765: Static test fix.
1 parent 8225526 commit 8746079

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

app/code/Magento/Widget/Controller/Adminhtml/Widget/Instance/MassDelete.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function execute(): Redirect
7171

7272
foreach ($instanceIds as $instanceId) {
7373
try {
74-
$this->deleteWidgetById->execute((int) $instanceId);
74+
$this->deleteWidgetById->execute((int)$instanceId);
7575
$deletedInstances++;
7676
} catch (NoSuchEntityException $e) {
7777
$notDeletedInstances[] = $instanceId;
@@ -83,10 +83,12 @@ public function execute(): Redirect
8383
}
8484

8585
if (count($notDeletedInstances)) {
86-
$this->messageManager->addErrorMessage(__(
87-
'Widget(s) with ID(s) %1 were not found',
88-
trim(implode(', ', $notDeletedInstances))
89-
));
86+
$this->messageManager->addErrorMessage(
87+
__(
88+
'Widget(s) with ID(s) %1 were not found',
89+
trim(implode(', ', $notDeletedInstances))
90+
)
91+
);
9092
}
9193

9294
/** @var Redirect $resultRedirect */
@@ -96,6 +98,8 @@ public function execute(): Redirect
9698
}
9799

98100
/**
101+
* Get instance IDs.
102+
*
99103
* @return array
100104
*/
101105
private function getInstanceIds(): array
@@ -110,7 +114,9 @@ private function getInstanceIds(): array
110114
}
111115

112116
/**
113-
* @return ResultInterface|RedirectInterface
117+
* Get result page.
118+
*
119+
* @return ResultInterface|null
114120
*/
115121
private function getResultPage(): ?ResultInterface
116122
{

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public function execute(int $instanceId) : void
5454
}
5555

5656
/**
57+
* Get widget instance by given instance ID
58+
*
5759
* @param int $instanceId
5860
* @return WidgetInstance
5961
* @throws NoSuchEntityException

0 commit comments

Comments
 (0)