Skip to content

Commit f15a220

Browse files
PHPDoc block updates & reverted observer fix
1 parent 0b09b5e commit f15a220

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

app/code/Magento/Customer/Controller/Adminhtml/Group/Delete.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
@@ -9,6 +8,9 @@
98
use Magento\Framework\App\Action\HttpPostActionInterface;
109
use Magento\Framework\Exception\NoSuchEntityException;
1110

11+
/**
12+
* Class Delete
13+
*/
1214
class Delete extends \Magento\Customer\Controller\Adminhtml\Group implements HttpPostActionInterface
1315
{
1416
/**

app/code/Magento/Customer/Observer/AfterAddressSaveObserver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ protected function addValidMessage($customerAddress, $validationResult)
255255
: (string)__('You will not be charged tax.');
256256
}
257257

258-
$this->messageManager->addSuccessMessage(implode(' ', $message));
258+
$this->messageManager->addSuccess(implode(' ', $message));
259259

260260
return $this;
261261
}
@@ -280,7 +280,7 @@ protected function addInvalidMessage($customerAddress)
280280
$message[] = (string)__('You will be charged tax.');
281281
}
282282

283-
$this->messageManager->addErrorMessage(implode(' ', $message));
283+
$this->messageManager->addError(implode(' ', $message));
284284

285285
return $this;
286286
}
@@ -307,7 +307,7 @@ protected function addErrorMessage($customerAddress)
307307
$email = $this->scopeConfig->getValue('trans_email/ident_support/email', ScopeInterface::SCOPE_STORE);
308308
$message[] = (string)__('If you believe this is an error, please contact us at %1', $email);
309309

310-
$this->messageManager->addErrorMessage(implode(' ', $message));
310+
$this->messageManager->addError(implode(' ', $message));
311311

312312
return $this;
313313
}

app/code/Magento/Customer/Test/Unit/Observer/AfterAddressSaveObserverTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ public function testAfterAddressSaveNewGroup(
575575

576576
if ($resultValidMessage) {
577577
$this->messageManager->expects($this->once())
578-
->method('addSuccessMessage')
578+
->method('addSuccess')
579579
->with($resultValidMessage)
580580
->willReturnSelf();
581581
}
@@ -585,7 +585,7 @@ public function testAfterAddressSaveNewGroup(
585585
->with($vatId)
586586
->willReturn($vatId);
587587
$this->messageManager->expects($this->once())
588-
->method('addErrorMessage')
588+
->method('addError')
589589
->with($resultInvalidMessage)
590590
->willReturnSelf();
591591
}
@@ -595,7 +595,7 @@ public function testAfterAddressSaveNewGroup(
595595
->with('trans_email/ident_support/email', ScopeInterface::SCOPE_STORE)
596596
->willReturn('admin@example.com');
597597
$this->messageManager->expects($this->once())
598-
->method('addErrorMessage')
598+
->method('addError')
599599
->with($resultErrorMessage)
600600
->willReturnSelf();
601601
}

0 commit comments

Comments
 (0)