Passed
Push — master ( 86cfdb...e29dd4 )
by nguereza
03:59 queued 01:47
created

StatusList::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Platine\App\Helper;
6
7
use Platine\App\Enum\UserStatus;
8
use Platine\Lang\Lang;
9
10
/**
11
* @class AuthParam
12
* @package Platine\App\Param
13
*/
14
class StatusList
15
{
16
    /**
17
    * The Language instance
18
    * @var Lang
19
    */
20
    protected Lang $lang;
21
22
    /**
23
     * Create new instance
24
     * @param Lang $lang
25
     */
26
    public function __construct(Lang $lang)
27
    {
28
        $this->lang = $lang;
29
    }
30
31
    /**
32
     * Return the user status
33
     * @return array<string, string>
34
     */
35
    public function getUserStatus(): array
36
    {
37
        return [
38
            UserStatus::ACTIVE => $this->lang->tr('Active'),
39
            UserStatus::LOCKED => $this->lang->tr('Locked'),
40
        ];
41
    }
42
}
43