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

DecryptSettings   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 21
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setDefaultKeyName() 0 3 1
A getDefaultKeyName() 0 3 1
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