CustomerPageConfig::isDoubleOptInEnabled()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the Spryker Commerce OS.
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
declare(strict_types = 1);
9
10
namespace Pyz\Yves\CustomerPage;
11
12
use SprykerShop\Yves\CustomerPage\CustomerPageConfig as SprykerCustomerPageConfig;
13
14
class CustomerPageConfig extends SprykerCustomerPageConfig
15
{
16
    protected const CUSTOMER_SECURITY_BLOCKER_ENABLED = true;
17
18
    /**
19
     * @uses \Pyz\Zed\Customer\CustomerConfig::MIN_LENGTH_CUSTOMER_PASSWORD
20
     */
21
    protected const MIN_LENGTH_CUSTOMER_PASSWORD = 12;
22
23
    /**
24
     * @uses \Pyz\Zed\Customer\CustomerConfig::MAX_LENGTH_CUSTOMER_PASSWORD
25
     */
26
    protected const MAX_LENGTH_CUSTOMER_PASSWORD = 128;
27
28
    protected const IS_ORDER_HISTORY_SEARCH_ENABLED = true;
29
30
    protected const PASSWORD_VALIDATION_PATTERN = '/^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[!@#$%^&*()\_\-\=\+\[\]\{\}\|;:<>.,\/?\\~])[A-Za-z\d!@#$%^&*()\_\-\=\+\[\]\{\}\|;:<>.,\/?\\~]+$/';
31
32
    protected const PASSWORD_VALIDATION_MESSAGE = 'global.password.invalid_password';
33
34
    /**
35
     * {@inheritDoc}
36
     *
37
     * @return bool
38
     */
39
    public function isDoubleOptInEnabled(): bool
40
    {
41
        return true;
42
    }
43
44
    /**
45
     * {@inheritDoc}
46
     *
47
     * @api
48
     *
49
     * @deprecated Will be removed without replacement. If the future the locale-specific URL will be used.
50
     *
51
     * @return bool
52
     */
53
    public function isLocaleInLoginCheckPath(): bool
54
    {
55
        return true;
56
    }
57
58
    public function isRememberMeEnabled(): bool
59
    {
60
        return false;
61
    }
62
63
    /**
64
     * Specification:
65
     * - Returns the pattern for customer password validation.
66
     *
67
     * @api
68
     */
69
    public function getCustomerPasswordPattern(): string
70
    {
71
        return static::PASSWORD_VALIDATION_PATTERN;
72
    }
73
74
    /**
75
     * Specification:
76
     * - Returns the message for customer password validation.
77
     *
78
     * @api
79
     */
80
    public function getPasswordValidationMessage(): string
81
    {
82
        return static::PASSWORD_VALIDATION_MESSAGE;
83
    }
84
}
85