Code Duplication    Length = 8-10 lines in 2 locations

src/storage/Client.php 1 location

@@ 39-46 (lines=8) @@
36
    public $allowed_ips;
37
    public $totp_secret;
38
39
    public function rules()
40
    {
41
        return [
42
            [['username', 'email', 'password', 'first_name', 'last_name'], 'trim'],
43
            [['state'], 'trim'],
44
            [['email_confirmed', 'allowed_ips', 'totp_secret'], 'trim'],
45
        ];
46
    }
47
48
    public function init()
49
    {

src/storage/Contact.php 1 location

@@ 26-35 (lines=10) @@
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function rules()
27
    {
28
        return [
29
            [['first_name', 'last_name'], 'trim'],
30
            [['first_name', 'last_name'], 'string', 'min' => 2, 'max' => 64],
31
32
            ['email', 'trim'],
33
            ['email', 'email'],
34
        ];
35
    }
36
}
37