Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
6 / 6
CRAP
100.00% covered (success)
100.00%
1 / 1
SignatureRejected
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
6 / 6
6
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getIdentifier
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getName
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getPriority
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 canChangeNotification
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 canChangeMail
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4/**
5 * SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
6 * SPDX-License-Identifier: AGPL-3.0-or-later
7 */
8
9namespace OCA\Libresign\Activity\Settings;
10
11use OCA\Libresign\Events\SignatureRejectedEvent;
12use OCP\IL10N;
13
14class SignatureRejected extends LibresignActivitySettings {
15    public function __construct(
16        protected IL10N $l,
17    ) {
18    }
19
20    /**
21     * {@inheritdoc}
22     */
23    #[\Override]
24    public function getIdentifier(): string {
25        return SignatureRejectedEvent::SIGNATURE_REJECTED;
26    }
27
28    /**
29     * {@inheritdoc}
30     */
31    #[\Override]
32    public function getName(): string {
33        // TRANSLATORS Activity app setting label for LibreSign events when a signer refuses to sign a document. Keep the <strong> markup.
34        return $this->l->t('A signature request has been <strong>rejected</strong>');
35    }
36
37    /**
38     * {@inheritdoc}
39     */
40    #[\Override]
41    public function getPriority(): int {
42        return 52;
43    }
44
45    /**
46     * {@inheritdoc}
47     */
48    #[\Override]
49    public function canChangeNotification(): bool {
50        return true;
51    }
52
53    /**
54     * {@inheritdoc}
55     */
56    #[\Override]
57    public function canChangeMail() {
58        return true;
59    }
60}