Passed
Push — develop ( 53798b...20a922 )
by Enea
02:15
created

Determiner   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 15
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 3 1
A listenUnauthorizedOwnerEventForLogger() 0 3 1
A transformSecretNameToKebabCase() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * Created on 18/03/18 by enea dhack.
6
 */
7
8
namespace Enea\Authorization\Support;
9
10
class Determiner
11
{
12 49
    public static function listenUnauthorizedOwnerEventForLogger(): bool
13
    {
14 49
        return self::get('listeners.unauthorized-owner-logger', true);
15
    }
16
17 2
    public static function transformSecretNameToKebabCase(): bool
18
    {
19 2
        return self::get('authorizations.transform-secret-name-to-kebab-case', true);
20
    }
21
22 49
    private static function get(string $key, bool $default = false): bool
23
    {
24 49
        return (bool) config("authorization.{$key}", $default);
25
    }
26
}
27