StatusList::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

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