Skip to content

Commit 550f10e

Browse files
author
Tang, Yu(ytang1)
committed
Merge pull request #54 from magento-fearless-kiwis/FearlessKiwis-MAGETWO-44491-Rename-Dispatch-Execute
Fearless kiwis magetwo 44491 rename dispatch execute
2 parents 9272b2f + 4b9a7c7 commit 550f10e

File tree

1,135 files changed

+1629
-1604
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,135 files changed

+1629
-1604
lines changed

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/AjaxMarkAsRead.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class AjaxMarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Not
1313
*
1414
* @return void
1515
*/
16-
public function execute()
16+
public function executeInternal()
1717
{
1818
if (!$this->getRequest()->getPostValue()) {
1919
return;

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Index extends \Magento\AdminNotification\Controller\Adminhtml\Notification
1111
/**
1212
* @return void
1313
*/
14-
public function execute()
14+
public function executeInternal()
1515
{
1616
$this->_view->loadLayout();
1717
$this->_setActiveMenu(

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MarkAsRead.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class MarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Notific
1111
/**
1212
* @return void
1313
*/
14-
public function execute()
14+
public function executeInternal()
1515
{
1616
$notificationId = (int)$this->getRequest()->getParam('id');
1717
if ($notificationId) {

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MassMarkAsRead.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class MassMarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Not
1111
/**
1212
* @return void
1313
*/
14-
public function execute()
14+
public function executeInternal()
1515
{
1616
$ids = $this->getRequest()->getParam('notification');
1717
if (!is_array($ids)) {

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MassRemove.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class MassRemove extends \Magento\AdminNotification\Controller\Adminhtml\Notific
1111
/**
1212
* @return void
1313
*/
14-
public function execute()
14+
public function executeInternal()
1515
{
1616
$ids = $this->getRequest()->getParam('notification');
1717
if (!is_array($ids)) {

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/Remove.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Remove extends \Magento\AdminNotification\Controller\Adminhtml\Notificatio
1111
/**
1212
* @return void
1313
*/
14-
public function execute()
14+
public function executeInternal()
1515
{
1616
if ($id = $this->getRequest()->getParam('id')) {
1717
$model = $this->_objectManager->create('Magento\AdminNotification\Model\Inbox')->load($id);

app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct(
3838
/**
3939
* @return void
4040
*/
41-
public function execute()
41+
public function executeInternal()
4242
{
4343
$severity = $this->getRequest()->getParam('severity');
4444
if ($severity) {

app/code/Magento/AdvancedPricingImportExport/Controller/Adminhtml/Export/GetFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class GetFilter extends ExportController
1717
*
1818
* @return \Magento\Framework\Controller\ResultInterface
1919
*/
20-
public function execute()
20+
public function executeInternal()
2121
{
2222
$data = $this->getRequest()->getParams();
2323
if ($this->getRequest()->isXmlHttpRequest() && $data) {

app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/Place.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(
5151
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
5252
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
5353
*/
54-
public function execute()
54+
public function executeInternal()
5555
{
5656
$paymentParam = $this->getRequest()->getParam('payment');
5757
$controller = $this->getRequest()->getParam('controller');

app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/Redirect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected function _returnQuote($cancelOrder, $errorMsg)
9090
*
9191
* @return \Magento\Framework\View\Result\Layout
9292
*/
93-
public function execute()
93+
public function executeInternal()
9494
{
9595
$redirectParams = $this->getRequest()->getParams();
9696
$params = [];

app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/ReturnQuote.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected function _returnQuote()
3131
*
3232
* @return void
3333
*/
34-
public function execute()
34+
public function executeInternal()
3535
{
3636
$this->_returnQuote();
3737
$this->getResponse()->representJson(

app/code/Magento/Authorizenet/Controller/Directpost/Payment/BackendResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class BackendResponse extends \Magento\Authorizenet\Controller\Directpost\Paymen
1414
*
1515
* @return void
1616
*/
17-
public function execute()
17+
public function executeInternal()
1818
{
1919
$this->_responseAction('adminhtml');
2020
}

app/code/Magento/Authorizenet/Controller/Directpost/Payment/Place.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function __construct(
7171
*
7272
* @return string
7373
*/
74-
public function execute()
74+
public function executeInternal()
7575
{
7676
$paymentParam = $this->getRequest()->getParam('payment');
7777
$controller = $this->getRequest()->getParam('controller');

app/code/Magento/Authorizenet/Controller/Directpost/Payment/Redirect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Redirect extends \Magento\Authorizenet\Controller\Directpost\Payment
1515
*
1616
* @return void
1717
*/
18-
public function execute()
18+
public function executeInternal()
1919
{
2020
$helper = $this->dataFactory->create('frontend');
2121

app/code/Magento/Authorizenet/Controller/Directpost/Payment/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Response extends \Magento\Authorizenet\Controller\Directpost\Payment
1414
*
1515
* @return void
1616
*/
17-
public function execute()
17+
public function executeInternal()
1818
{
1919
$this->_responseAction('frontend');
2020
}

app/code/Magento/Authorizenet/Controller/Directpost/Payment/ReturnQuote.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ReturnQuote extends \Magento\Authorizenet\Controller\Directpost\Payment
1313
*
1414
* @return void
1515
*/
16-
public function execute()
16+
public function executeInternal()
1717
{
1818
$this->_returnCustomerQuote();
1919
$this->getResponse()->representJson(

app/code/Magento/Authorizenet/Test/Unit/Controller/Adminhtml/Authorizenet/Directpost/Payment/RedirectTest.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ class RedirectTest extends \PHPUnit_Framework_TestCase
9696
*/
9797
protected $helperMock;
9898

99+
/**
100+
* @var Redirect|\PHPUnit_Framework_MockObject_MockObject
101+
*/
102+
protected $controller;
103+
99104
protected function setUp()
100105
{
101106
$this->directpostSessionMock = $this->getMockBuilder('Magento\Authorizenet\Model\Directpost\Session')
@@ -196,7 +201,7 @@ protected function setUp()
196201
);
197202
}
198203

199-
public function testExecuteErrorMsgWithoutCancelOrder()
204+
public function testExecuteInternalErrorMsgWithoutCancelOrder()
200205
{
201206
$params = ['success' => 0, 'error_msg' => 'Error message'];
202207
$incrementId = 1;
@@ -238,10 +243,10 @@ public function testExecuteErrorMsgWithoutCancelOrder()
238243
->method('register')
239244
->with(Iframe::REGISTRY_KEY);
240245

241-
$this->assertInstanceOf('\Magento\Framework\View\Result\Layout', $this->controller->execute());
246+
$this->assertInstanceOf('\Magento\Framework\View\Result\Layout', $this->controller->executeInternal());
242247
}
243248

244-
public function testExecuteErrorMsgWithCancelOrder()
249+
public function testExecuteInternalErrorMsgWithCancelOrder()
245250
{
246251
$params = ['success' => 0, 'error_msg' => 'Error message', 'x_invoice_num' => 1];
247252
$incrementId = 1;
@@ -273,10 +278,10 @@ public function testExecuteErrorMsgWithCancelOrder()
273278
->method('register')
274279
->with(Iframe::REGISTRY_KEY);
275280

276-
$this->assertInstanceOf('\Magento\Framework\View\Result\Layout', $this->controller->execute());
281+
$this->assertInstanceOf('\Magento\Framework\View\Result\Layout', $this->controller->executeInternal());
277282
}
278283

279-
public function testExecuteSuccess()
284+
public function testExecuteInternalSuccess()
280285
{
281286
$params = ['success' => 1, 'controller_action_name' => 'action', 'x_invoice_num' => 1];
282287
$this->requestMock->expects($this->once())
@@ -307,6 +312,6 @@ public function testExecuteSuccess()
307312
->method('register')
308313
->with(Iframe::REGISTRY_KEY);
309314

310-
$this->assertInstanceOf('\Magento\Framework\View\Result\Layout', $this->controller->execute());
315+
$this->assertInstanceOf('\Magento\Framework\View\Result\Layout', $this->controller->executeInternal());
311316
}
312317
}

app/code/Magento/Authorizenet/Test/Unit/Controller/Directpost/Payment/PlaceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public function testExecute(
205205
->method('jsonEncode')
206206
->with($result);
207207

208-
$this->placeOrderController->execute();
208+
$this->placeOrderController->executeInternal();
209209
}
210210

211211
/**
@@ -243,7 +243,7 @@ public function testExecuteFailedPlaceOrder(
243243
->method('jsonEncode')
244244
->with($result);
245245

246-
$this->placeOrderController->execute();
246+
$this->placeOrderController->executeInternal();
247247
}
248248

249249
/**

app/code/Magento/Backend/App/AbstractAction.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,10 @@ private function _moveBlockToContainer(\Magento\Framework\View\Element\AbstractB
200200
* @param \Magento\Framework\App\RequestInterface $request
201201
* @return \Magento\Framework\App\ResponseInterface
202202
*/
203-
public function dispatch(\Magento\Framework\App\RequestInterface $request)
203+
public function execute(\Magento\Framework\App\RequestInterface $request)
204204
{
205205
if (!$this->_processUrlKeys()) {
206-
return parent::dispatch($request);
206+
return parent::execute($request);
207207
}
208208

209209
if ($request->isDispatched() && $request->getActionName() !== 'denied' && !$this->_isAllowed()) {
@@ -223,7 +223,7 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request)
223223

224224
$this->_processLocaleSettings();
225225

226-
return parent::dispatch($request);
226+
return parent::execute($request);
227227
}
228228

229229
/**

app/code/Magento/Backend/App/Action/Plugin/Authentication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function __construct(
101101
* @return mixed
102102
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
103103
*/
104-
public function aroundDispatch(
104+
public function aroundExecute(
105105
\Magento\Backend\App\AbstractAction $subject,
106106
\Closure $proceed,
107107
\Magento\Framework\App\RequestInterface $request

app/code/Magento/Backend/App/Action/Plugin/MassactionKey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class MassactionKey
1919
* @return mixed
2020
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
2121
*/
22-
public function aroundDispatch(
22+
public function aroundExecute(
2323
\Magento\Backend\App\AbstractAction $subject,
2424
\Closure $proceed,
2525
\Magento\Framework\App\RequestInterface $request

app/code/Magento/Backend/Controller/Adminhtml/Ajax/Translate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(
4040
*
4141
* @return \Magento\Framework\Controller\Result\Json
4242
*/
43-
public function execute()
43+
public function executeInternal()
4444
{
4545
$translate = (array)$this->getRequest()->getPost('translate');
4646

app/code/Magento/Backend/Controller/Adminhtml/Auth/DeniedIframe.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected function _getDeniedIframe()
4141
*
4242
* @return \Magento\Framework\Controller\Result\Raw
4343
*/
44-
public function execute()
44+
public function executeInternal()
4545
{
4646
/** @var \Magento\Framework\Controller\Result\Raw $resultRaw */
4747
$resultRaw = $this->resultRawFactory->create();

app/code/Magento/Backend/Controller/Adminhtml/Auth/DeniedJson.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function _getDeniedJson()
4343
*
4444
* @return \Magento\Framework\Controller\Result\Json
4545
*/
46-
public function execute()
46+
public function executeInternal()
4747
{
4848
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
4949
$resultJson = $this->resultJsonFactory->create();

app/code/Magento/Backend/Controller/Adminhtml/Auth/Login.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(
3232
*
3333
* @return \Magento\Backend\Model\View\Result\Redirect
3434
*/
35-
public function execute()
35+
public function executeInternal()
3636
{
3737
if ($this->_auth->isLoggedIn()) {
3838
if ($this->_auth->getAuthStorage()->isFirstPageAfterLogin()) {

app/code/Magento/Backend/Controller/Adminhtml/Auth/Logout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Logout extends \Magento\Backend\Controller\Adminhtml\Auth
1313
*
1414
* @return \Magento\Backend\Model\View\Result\Redirect
1515
*/
16-
public function execute()
16+
public function executeInternal()
1717
{
1818
$this->_auth->logout();
1919
$this->messageManager->addSuccess(__('You have logged out.'));

app/code/Magento/Backend/Controller/Adminhtml/BackendApp/Redirect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(
3939
/**
4040
* @return \Magento\Framework\Controller\ResultInterface
4141
*/
42-
public function execute()
42+
public function executeInternal()
4343
{
4444
$resultRedirect = $this->resultRedirectFactory->create();
4545
if ($this->getRequest()->getParam('app')) {

app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanImages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class CleanImages extends \Magento\Backend\Controller\Adminhtml\Cache
1616
*
1717
* @return \Magento\Backend\Model\View\Result\Redirect
1818
*/
19-
public function execute()
19+
public function executeInternal()
2020
{
2121
try {
2222
$this->_objectManager->create('Magento\Catalog\Model\Product\Image')->clearCache();

app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanMedia.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class CleanMedia extends \Magento\Backend\Controller\Adminhtml\Cache
1616
*
1717
* @return \Magento\Backend\Model\View\Result\Redirect
1818
*/
19-
public function execute()
19+
public function executeInternal()
2020
{
2121
try {
2222
$this->_objectManager->get('Magento\Framework\View\Asset\MergeService')->cleanMergedJsCss();

app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanStaticFiles.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class CleanStaticFiles extends \Magento\Backend\Controller\Adminhtml\Cache
1515
*
1616
* @return \Magento\Backend\Model\View\Result\Redirect
1717
*/
18-
public function execute()
18+
public function executeInternal()
1919
{
2020
$this->_objectManager->get('Magento\Framework\App\State\CleanupFiles')->clearMaterializedViewFiles();
2121
$this->_eventManager->dispatch('clean_static_files_cache_after');

app/code/Magento/Backend/Controller/Adminhtml/Cache/FlushAll.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class FlushAll extends \Magento\Backend\Controller\Adminhtml\Cache
1313
*
1414
* @return \Magento\Backend\Model\View\Result\Redirect
1515
*/
16-
public function execute()
16+
public function executeInternal()
1717
{
1818
$this->_eventManager->dispatch('adminhtml_cache_flush_all');
1919
/** @var $cacheFrontend \Magento\Framework\Cache\FrontendInterface */

app/code/Magento/Backend/Controller/Adminhtml/Cache/FlushSystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class FlushSystem extends \Magento\Backend\Controller\Adminhtml\Cache
1313
*
1414
* @return \Magento\Backend\Model\View\Result\Redirect
1515
*/
16-
public function execute()
16+
public function executeInternal()
1717
{
1818
/** @var $cacheFrontend \Magento\Framework\Cache\FrontendInterface */
1919
foreach ($this->_cacheFrontendPool as $cacheFrontend) {

app/code/Magento/Backend/Controller/Adminhtml/Cache/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Index extends \Magento\Backend\Controller\Adminhtml\Cache
1313
*
1414
* @return \Magento\Backend\Model\View\Result\Page
1515
*/
16-
public function execute()
16+
public function executeInternal()
1717
{
1818
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
1919
$resultPage = $this->resultPageFactory->create();

app/code/Magento/Backend/Controller/Adminhtml/Cache/MassDisable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MassDisable extends \Magento\Backend\Controller\Adminhtml\Cache
1616
*
1717
* @return \Magento\Backend\Model\View\Result\Redirect
1818
*/
19-
public function execute()
19+
public function executeInternal()
2020
{
2121
try {
2222
$types = $this->getRequest()->getParam('types');

app/code/Magento/Backend/Controller/Adminhtml/Cache/MassEnable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MassEnable extends \Magento\Backend\Controller\Adminhtml\Cache
1616
*
1717
* @return \Magento\Backend\Model\View\Result\Redirect
1818
*/
19-
public function execute()
19+
public function executeInternal()
2020
{
2121
try {
2222
$types = $this->getRequest()->getParam('types');

app/code/Magento/Backend/Controller/Adminhtml/Cache/MassRefresh.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MassRefresh extends \Magento\Backend\Controller\Adminhtml\Cache
1616
*
1717
* @return \Magento\Backend\Model\View\Result\Redirect
1818
*/
19-
public function execute()
19+
public function executeInternal()
2020
{
2121
try {
2222
$types = $this->getRequest()->getParam('types');

0 commit comments

Comments
 (0)