Skip to content

Commit

Permalink
Fix code indent
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruslan-Aleev committed Dec 13, 2023
1 parent 56037bd commit e705e42
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
14 changes: 7 additions & 7 deletions core/src/Revolution/Processors/Security/User/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ public static function getInstance(modX $modx,$className,$properties = []) {
public function initialize() {
$this->setDefaultProperties(
[
'class_key' => $this->classKey,
'blocked' => false,
'active' => false,
'class_key' => $this->classKey,
'blocked' => false,
'active' => false,

Check warning on line 77 in core/src/Revolution/Processors/Security/User/Create.php

View check run for this annotation

Codecov / codecov/patch

core/src/Revolution/Processors/Security/User/Create.php#L75-L77

Added lines #L75 - L77 were not covered by tests
]
);
$this->classKey = $this->getProperty('class_key', modUser::class);
Expand Down Expand Up @@ -124,10 +124,10 @@ public function setUserGroups()
$membership = $this->modx->newObject(modUserGroupMember::class);
$membership->fromArray(
[
'user_group' => $group['usergroup'],
'role' => $group['role'],
'member' => $this->object->get('id'),
'rank' => isset($group['rank']) ? $group['rank'] : $idx
'user_group' => $group['usergroup'],
'role' => $group['role'],
'member' => $this->object->get('id'),
'rank' => isset($group['rank']) ? $group['rank'] : $idx

Check warning on line 130 in core/src/Revolution/Processors/Security/User/Create.php

View check run for this annotation

Codecov / codecov/patch

core/src/Revolution/Processors/Security/User/Create.php#L127-L130

Added lines #L127 - L130 were not covered by tests
]
);
if (empty($group['rank'])) {
Expand Down
40 changes: 20 additions & 20 deletions core/src/Revolution/Processors/Security/User/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ public function checkActiveChange() {
if ($this->activeStatusChanged) {
$event = $this->newActiveStatus == true ? 'OnBeforeUserActivate' : 'OnBeforeUserDeactivate';
$OnBeforeUserActivate = $this->modx->invokeEvent($event,
[
'id' => $this->object->get('id'),
'user' => &$this->object,
'mode' => modSystemEvent::MODE_UPD,
]
[
'id' => $this->object->get('id'),
'user' => &$this->object,
'mode' => modSystemEvent::MODE_UPD,
]

Check warning on line 140 in core/src/Revolution/Processors/Security/User/Update.php

View check run for this annotation

Codecov / codecov/patch

core/src/Revolution/Processors/Security/User/Update.php#L136-L140

Added lines #L136 - L140 were not covered by tests
);
$canChange = $this->processEventResponse($OnBeforeUserActivate);
if (!empty($canChange)) {
Expand Down Expand Up @@ -208,8 +208,8 @@ public function setUserGroups() {
$existingGroup = $currentGroups[$existingMembership->get('user_group')];
$existingMembership->fromArray(
[
'role' => $existingGroup['role'],
'rank' => isset($existingGroup['rank']) ? $existingGroup['rank'] : 0
'role' => $existingGroup['role'],
'rank' => isset($existingGroup['rank']) ? $existingGroup['rank'] : 0

Check warning on line 212 in core/src/Revolution/Processors/Security/User/Update.php

View check run for this annotation

Codecov / codecov/patch

core/src/Revolution/Processors/Security/User/Update.php#L211-L212

Added lines #L211 - L212 were not covered by tests
]
);
$remainingGroupIds[] = $existingMembership->get('user_group');
Expand All @@ -233,10 +233,10 @@ public function setUserGroups() {
$membership = $this->modx->newObject(modUserGroupMember::class);
$membership->fromArray(
[
'user_group' => $newGroup['usergroup'],
'role' => $newGroup['role'],
'member' => $this->object->get('id'),
'rank' => isset($newGroup['rank']) ? $newGroup['rank'] : $idx
'user_group' => $newGroup['usergroup'],
'role' => $newGroup['role'],
'member' => $this->object->get('id'),
'rank' => isset($newGroup['rank']) ? $newGroup['rank'] : $idx

Check warning on line 239 in core/src/Revolution/Processors/Security/User/Update.php

View check run for this annotation

Codecov / codecov/patch

core/src/Revolution/Processors/Security/User/Update.php#L236-L239

Added lines #L236 - L239 were not covered by tests
]
);
if (empty($newGroup['rank'])) {
Expand Down Expand Up @@ -297,11 +297,11 @@ public function afterSave() {
public function fireAfterActiveStatusChange() {
$event = $this->newActiveStatus == true ? 'OnUserActivate' : 'OnUserDeactivate';
$this->modx->invokeEvent($event,
[
'id' => $this->object->get('id'),
'user' => &$this->object,
'mode' => modSystemEvent::MODE_UPD,
]
[
'id' => $this->object->get('id'),
'user' => &$this->object,
'mode' => modSystemEvent::MODE_UPD,
]

Check warning on line 304 in core/src/Revolution/Processors/Security/User/Update.php

View check run for this annotation

Codecov / codecov/patch

core/src/Revolution/Processors/Security/User/Update.php#L300-L304

Added lines #L300 - L304 were not covered by tests
);
}

Expand All @@ -321,10 +321,10 @@ public function cleanup()
$passwordNotifyMethod = $this->getProperty('passwordnotifymethod');
if (!empty($passwordNotifyMethod) && !empty($this->newPassword) && $passwordNotifyMethod == 's') {
return $this->success($this->modx->lexicon('user_updated_password_message',
[
'username' => $userArray['username'],
'password' => $this->newPassword,
]
[
'username' => $userArray['username'],
'password' => $this->newPassword,
]

Check warning on line 327 in core/src/Revolution/Processors/Security/User/Update.php

View check run for this annotation

Codecov / codecov/patch

core/src/Revolution/Processors/Security/User/Update.php#L324-L327

Added lines #L324 - L327 were not covered by tests
), $this->object);
} else {
return $this->success('',$this->object);
Expand Down

0 comments on commit e705e42

Please sign in to comment.