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

Determiner::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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