EnvVars   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFilled() 0 10 1
A getEmpty() 0 3 1
1
<?php
2
3
namespace RemotelyLiving\PHPEnv\Tests\Stubs;
4
5
final class EnvVars
6
{
7
    public const KEY_STRING = 'STRING';
8
    public const KEY_INT = 'INT';
9
    public const KEY_FLOAT = 'FLOAT';
10
    public const KEY_JSON = 'JSON';
11
    public const KEY_SERIALIZED = 'SERIALIZED';
12
    public const KEY_BOOLISH_TRUE = 'BOOLISH_TRUE';
13
    public const KEY_BOOLISH_FALSE = 'BOOLISH_FALSE';
14
15
    public static function getEmpty(): array
16
    {
17
        return [];
18
    }
19
20
    public static function getFilled(): array
21
    {
22
        return [
23
            self::KEY_STRING => 'a regular old string',
24
            self::KEY_INT => '100',
25
            self::KEY_FLOAT => '100.01',
26
            self::KEY_JSON => '{"foo":"bar"}',
27
            self::KEY_SERIALIZED => 'O:8:"stdClass":1:{s:3:"foo";s:3:"bar";}',
28
            self::KEY_BOOLISH_TRUE => 'true',
29
            self::KEY_BOOLISH_FALSE => 'false',
30
        ];
31
    }
32
}
33