@@ -127,9 +127,9 @@ private function unifyResult(array $list): array {
127
127
}
128
128
129
129
private function formatForNcSelect (array $ list ): array {
130
- $ return = [];
130
+ $ formattedList = [];
131
131
foreach ($ list as $ key => $ item ) {
132
- $ return [$ key ] = [
132
+ $ formattedList [$ key ] = [
133
133
'id ' => $ item ['value ' ]['shareWith ' ],
134
134
'isNoUser ' => $ item ['value ' ]['shareType ' ] !== IShare::TYPE_USER
135
135
&& isset ($ item ['method ' ])
@@ -138,24 +138,24 @@ private function formatForNcSelect(array $list): array {
138
138
'subname ' => $ item ['shareWithDisplayNameUnique ' ] ?? '' ,
139
139
];
140
140
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 ' ;
143
143
} 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 ' ;
146
146
} elseif ($ item ['value ' ]['shareType ' ] === SignerPlugin::TYPE_SIGNER ) {
147
- $ return [$ key ]['method ' ] = $ item ['method ' ] ?? '' ;
147
+ $ formattedList [$ key ]['method ' ] = $ item ['method ' ] ?? '' ;
148
148
if ($ item ['method ' ] === 'email ' ) {
149
- $ return [$ key ]['icon ' ] = 'icon-mail ' ;
149
+ $ formattedList [$ key ]['icon ' ] = 'icon-mail ' ;
150
150
} elseif ($ item ['method ' ] === 'account ' ) {
151
- $ return [$ key ]['icon ' ] = 'icon-user ' ;
151
+ $ formattedList [$ key ]['icon ' ] = 'icon-user ' ;
152
152
} 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 ' ];
155
155
}
156
156
}
157
157
}
158
- return $ return ;
158
+ return $ formattedList ;
159
159
}
160
160
161
161
private function addHerselfAccount (array $ return , string $ search ): array {
0 commit comments