Passed
Pull Request — master (#13)
by Sebastian
04:02
created

DecryptSettings::getDefaultKeyName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Mailcode\Decrypt;
6
7
class DecryptSettings
8
{
9
    private static ?string $defaultKeyName = null;
10
11
    /**
12
     * @param string|NULL $decryptionKey A decryption key name, or NULL to reset to the default.
13
     * @return void
14
     */
15
    public static function setDefaultKeyName(?string $decryptionKey): void
16
    {
17
        self::$defaultKeyName = $decryptionKey;
18
    }
19
20
    /**
21
     * Gets the default decryption key name for decryption.
22
     *
23
     * @return string
24
     */
25
    public static function getDefaultKeyName(): ?string
26
    {
27
        return self::$defaultKeyName;
28
    }
29
}
30