Code Duplication    Length = 45-45 lines in 2 locations

core/domain/services/graphql/enums/DatetimeStatusEnum.php 1 location

@@ 16-60 (lines=45) @@
13
 * @author  Manzoor Wani
14
 * @since   $VID:$
15
 */
16
class DatetimeStatusEnum extends EnumBase
17
{
18
19
    /**
20
     * DatetimeStatusEnum constructor.
21
     */
22
    public function __construct()
23
    {
24
        $this->setName($this->namespace . 'DatetimeStatusEnum');
25
        $this->setDescription(esc_html__('Datetime status', 'event_espresso'));
26
        parent::__construct();
27
    }
28
29
30
    /**
31
     * @return array
32
     * @since $VID:$
33
     */
34
    protected function getValues()
35
    {
36
        return [
37
            'SOLD_OUT'     => [
38
                'value'       => EE_Datetime::sold_out,
39
            ],
40
            'ACTIVE'     => [
41
                'value'       => EE_Datetime::active,
42
            ],
43
            'UPCOMING'     => [
44
                'value'       => EE_Datetime::upcoming,
45
            ],
46
            'POSTPONED'     => [
47
                'value'       => EE_Datetime::postponed,
48
            ],
49
            'CANCELLED'     => [
50
                'value'       => EE_Datetime::cancelled,
51
            ],
52
            'EXPIRED'     => [
53
                'value'       => EE_Datetime::expired,
54
            ],
55
            'INACTIVE'     => [
56
                'value'       => EE_Datetime::inactive,
57
            ],
58
        ];
59
    }
60
}
61

core/domain/services/graphql/enums/RegistrationStatusEnum.php 1 location

@@ 16-60 (lines=45) @@
13
 * @author  Manzoor Wani
14
 * @since   $VID:$
15
 */
16
class RegistrationStatusEnum extends EnumBase
17
{
18
19
    /**
20
     * RegistrationStatusEnum constructor.
21
     */
22
    public function __construct()
23
    {
24
        $this->setName($this->namespace . 'RegistrationStatusEnum');
25
        $this->setDescription(esc_html__('Registration status', 'event_espresso'));
26
        parent::__construct();
27
    }
28
29
30
    /**
31
     * @return array
32
     * @since $VID:$
33
     */
34
    protected function getValues()
35
    {
36
        return [
37
            'APPROVED'        => [
38
                'value' => EEM_Registration::status_id_approved,
39
            ],
40
            'CANCELLED'       => [
41
                'value' => EEM_Registration::status_id_cancelled,
42
            ],
43
            'DECLINED'        => [
44
                'value' => EEM_Registration::status_id_declined,
45
            ],
46
            'INCOMPLETE'      => [
47
                'value' => EEM_Registration::status_id_incomplete,
48
            ],
49
            'PENDING_PAYMENT' => [
50
                'value' => EEM_Registration::status_id_pending_payment,
51
            ],
52
            'UNAPPROVED'      => [
53
                'value' => EEM_Registration::status_id_not_approved,
54
            ],
55
            'WAIT_LIST'       => [
56
                'value' => EEM_Registration::status_id_wait_list,
57
            ],
58
        ];
59
    }
60
}
61