EncryptionConfigurationException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 13
ccs 4
cts 4
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A undeterminedEncryption() 0 6 1
1
<?php
2
/**
3
 * PHP version 7
4
 * Application: directus_keycloak_client
5
 *
6
 * @category OAuth_2_Client_Library_Usage_For_Keycloak_With_Directus
7
 * @package  Makuro\Directus\KeycloakClient\Provider
8
 * @author   Eric Delaporte <[email protected]>
9
 * @license  https://opensource.org/licenses/MIT MIT
10
 * @link     https://packagist.org/packages/makuro/directus_keycloak_client
11
 * Date: 19.11.19
12
 * Time: 23:59
13
 */
14
namespace Makuro\Directus\KeycloakClient\Provider\Exception;
15
16
use Exception;
17
18
/**
19
 * Class EncryptionConfigurationException
20
 *
21
 * @category OAuth_2_Client_Library_Usage_For_Keycloak_With_Directus
22
 * @package  Makuro\Directus\KeycloakClient\Provider
23
 * @author   Eric Delaporte <[email protected]>
24
 * @license  https://opensource.org/licenses/MIT MIT
25
 * @link     https://packagist.org/packages/makuro/directus_keycloak_client
26
 */
27
class EncryptionConfigurationException extends Exception
28
{
29
    /**
30
     * Returns properly formatted exception when response decryption fails.
31
     *
32
     * @return EncryptionConfigurationException
33
     */
34 1
    public static function undeterminedEncryption()
35
    {
36 1
        return new static(
37
            'The given response may be encrypted and sufficient '.
38 1
            'encryption configuration has not been provided.',
39 1
            400
40
        );
41
    }
42
}
43