Skip to content

Commit b5e8b65

Browse files
fix coding-standard
1 parent 41fc278 commit b5e8b65

File tree

1 file changed

+10
-5
lines changed
  • app/code/Magento/Backend/Controller/Adminhtml/System/Account

1 file changed

+10
-5
lines changed

app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ class Save extends \Magento\Backend\Controller\Adminhtml\System\Account
2525
/**
2626
* Get security cookie
2727
*
28+
* @deprecated 100.1.0 The method getSecurityCookie() is deprecated and no longer needed.
29+
* Use dependency injection to get an instance of SecurityCookie instead.
2830
* @return SecurityCookie
29-
* @deprecated 100.1.0
3031
*/
3132
private function getSecurityCookie()
3233
{
@@ -85,23 +86,27 @@ public function execute()
8586
// Check which fields were modified after saving
8687
$modifiedFields = [];
8788
$propertiesToCheck = ['password', 'username', 'firstname', 'lastname', 'email'];
88-
89+
8990
foreach ($propertiesToCheck as $property) {
9091
if ($user->getOrigData($property) !== $user->{'get' . ucfirst($property)}()) {
9192
$modifiedFields[] = $property;
9293
}
9394
}
94-
95+
9596
if (!empty($modifiedFields)) {
9697
$countModifiedFields = count($modifiedFields);
9798
$successMessage = '';
9899
// validate how many fields were modified to display them correctly
99100
if ($countModifiedFields > 1) {
100101
$lastModifiedField = array_pop($modifiedFields);
101102
$modifiedFieldsText = implode(', ', $modifiedFields);
102-
$successMessage = __('The %1, and %2 of this account have been modified successfully.', $modifiedFieldsText, $lastModifiedField);
103+
$successMessage =
104+
__('The %1 and %2 of this account have been modified successfully.',
105+
$modifiedFieldsText,$lastModifiedField);
103106
} else {
104-
$successMessage = __('The %1 of this account has been modified successfully.', reset($modifiedFields));
107+
$successMessage =
108+
__('The %1 of this account has been modified successfully.',
109+
reset($modifiedFields));
105110
}
106111
$this->messageManager->addSuccessMessage($successMessage);
107112
} else {

0 commit comments

Comments
 (0)