Skip to content

Commit ac00ee8

Browse files
committed
fix: suggestion from code reviw
#5459 (comment) Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent c3432cd commit ac00ee8

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

lib/Controller/IdentifyAccountController.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ private function unifyResult(array $list): array {
127127
}
128128

129129
private function formatForNcSelect(array $list): array {
130-
$return = [];
130+
$formattedList = [];
131131
foreach ($list as $key => $item) {
132-
$return[$key] = [
132+
$formattedList[$key] = [
133133
'id' => $item['value']['shareWith'],
134134
'isNoUser' => $item['value']['shareType'] !== IShare::TYPE_USER
135135
&& isset($item['method'])
@@ -138,24 +138,24 @@ private function formatForNcSelect(array $list): array {
138138
'subname' => $item['shareWithDisplayNameUnique'] ?? '',
139139
];
140140
if ($item['value']['shareType'] === IShare::TYPE_EMAIL) {
141-
$return[$key]['method'] = 'email';
142-
$return[$key]['icon'] = 'icon-mail';
141+
$formattedList[$key]['method'] = 'email';
142+
$formattedList[$key]['icon'] = 'icon-mail';
143143
} elseif ($item['value']['shareType'] === IShare::TYPE_USER) {
144-
$return[$key]['method'] = 'account';
145-
$return[$key]['icon'] = 'icon-user';
144+
$formattedList[$key]['method'] = 'account';
145+
$formattedList[$key]['icon'] = 'icon-user';
146146
} elseif ($item['value']['shareType'] === SignerPlugin::TYPE_SIGNER) {
147-
$return[$key]['method'] = $item['method'] ?? '';
147+
$formattedList[$key]['method'] = $item['method'] ?? '';
148148
if ($item['method'] === 'email') {
149-
$return[$key]['icon'] = 'icon-mail';
149+
$formattedList[$key]['icon'] = 'icon-mail';
150150
} elseif ($item['method'] === 'account') {
151-
$return[$key]['icon'] = 'icon-user';
151+
$formattedList[$key]['icon'] = 'icon-user';
152152
} else {
153-
$return[$key]['iconSvg'] = 'svg' . ucfirst($item['method']);
154-
$return[$key]['iconName'] = $item['method'];
153+
$formattedList[$key]['iconSvg'] = 'svg' . ucfirst($item['method']);
154+
$formattedList[$key]['iconName'] = $item['method'];
155155
}
156156
}
157157
}
158-
return $return;
158+
return $formattedList;
159159
}
160160

161161
private function addHerselfAccount(array $return, string $search): array {

0 commit comments

Comments
 (0)