1212use OCA \Libresign \Db \IdentifyMethodMapper ;
1313use OCA \Libresign \Db \SignRequest ;
1414use OCA \Libresign \Exception \LibresignException ;
15+ use OCA \Libresign \ResponseDefinitions ;
1516use OCA \Libresign \Service \IdentifyMethod \Account ;
1617use OCA \Libresign \Service \IdentifyMethod \Email ;
1718use OCA \Libresign \Service \IdentifyMethod \IIdentifyMethod ;
2324use OCP \IL10N ;
2425use OCP \IUserManager ;
2526
27+ /**
28+ * @psalm-import-type LibresignIdentifyMethodSetting from ResponseDefinitions
29+ */
2630class IdentifyMethodService {
2731 public const IDENTIFY_ACCOUNT = 'account ' ;
2832 public const IDENTIFY_EMAIL = 'email ' ;
@@ -46,19 +50,7 @@ class IdentifyMethodService {
4650 ];
4751 private bool $ isRequest = true ;
4852 private ?IdentifyMethod $ currentIdentifyMethod = null ;
49- /**
50- * @var list<array{
51- * name: string,
52- * friendly_name: string,
53- * enabled: bool,
54- * mandatory: bool,
55- * signatureMethods?: array{
56- * clickToSign?: array{enabled: bool, label: string, name: string},
57- * emailToken?: array{blurredEmail: string, hasConfirmCode: bool, hashOfEmail: string, identifyMethod: 'account'|'email', label: string, needCode: bool},
58- * password?: array{hasSignatureFile: bool, label: string, name: string}
59- * }
60- * }>
61- */
53+ /** @var list<LibresignIdentifyMethodSetting> */
6254 private array $ identifyMethodsSettings = [];
6355 /**
6456 * @var array<string,array<IIdentifyMethod>>
@@ -337,19 +329,7 @@ public function save(SignRequest $signRequest, bool $notify = true): void {
337329 }
338330 }
339331
340- /**
341- * @return list<array{
342- * name: string,
343- * friendly_name: string,
344- * enabled: bool,
345- * mandatory: bool,
346- * signatureMethods?: array{
347- * clickToSign?: array{enabled: bool, label: string, name: string},
348- * emailToken?: array{blurredEmail: string, hasConfirmCode: bool, hashOfEmail: string, identifyMethod: 'account'|'email', label: string, needCode: bool},
349- * password?: array{hasSignatureFile: bool, label: string, name: string}
350- * }
351- * }>
352- */
332+ /** @return list<LibresignIdentifyMethodSetting> */
353333 public function getIdentifyMethodsSettings (): array {
354334 if ($ this ->identifyMethodsSettings ) {
355335 return $ this ->identifyMethodsSettings ;
0 commit comments