Code Duplication    Length = 38-41 lines in 2 locations

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

@@ 16-56 (lines=41) @@
13
 * @author  Manzoor Wani
14
 * @since   $VID:$
15
 */
16
class FormSectionStatusEnum extends EnumBase
17
{
18
19
    /**
20
     * FormSectionStatusEnum constructor.
21
     */
22
    public function __construct()
23
    {
24
        $this->setName($this->namespace . 'FormSectionStatusEnum');
25
        $this->setDescription(esc_html__(
26
            'Whether form section is active, archived, shared, trashed, or used as a default on new forms.',
27
            'event_espresso'
28
        ));
29
        parent::__construct();
30
    }
31
32
33
    /**
34
     * @return array
35
     */
36
    protected function getValues(): array
37
    {
38
        return [
39
            'ACTIVE'   => [
40
                'value' => Element::STATUS_ACTIVE,
41
            ],
42
            'ARCHIVED' => [
43
                'value' => Element::STATUS_ARCHIVED,
44
            ],
45
            'DEFAULT'  => [
46
                'value' => Element::STATUS_DEFAULT,
47
            ],
48
            'SHARED'   => [
49
                'value' => Element::STATUS_SHARED,
50
            ],
51
            'TRASHED'  => [
52
                'value' => Element::STATUS_TRASHED,
53
            ],
54
        ];
55
    }
56
}
57

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

@@ 16-53 (lines=38) @@
13
 * @author  Manzoor Wani
14
 * @since   $VID:$
15
 */
16
class TicketStatusEnum extends EnumBase
17
{
18
19
    /**
20
     * TicketStatusEnum constructor.
21
     */
22
    public function __construct()
23
    {
24
        $this->setName($this->namespace . 'TicketStatusEnum');
25
        $this->setDescription(esc_html__('Whether the ticket is On Sale, Pending, or Expired', 'event_espresso'));
26
        parent::__construct();
27
    }
28
29
30
    /**
31
     * @return array
32
     */
33
    protected function getValues(): array
34
    {
35
        return [
36
            'SOLD_OUT'     => [
37
                'value'       => EE_Ticket::sold_out,
38
            ],
39
            'EXPIRED'     => [
40
                'value'       => EE_Ticket::expired,
41
            ],
42
            'ARCHIVED'     => [
43
                'value'       => EE_Ticket::archived,
44
            ],
45
            'PENDING'     => [
46
                'value'       => EE_Ticket::pending,
47
            ],
48
            'ONSALE'     => [
49
                'value'       => EE_Ticket::onsale,
50
            ],
51
        ];
52
    }
53
}
54