undeterminedEncryption()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 1
rs 10
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