Completed
Branch EDTR/master (af42c6)
by
unknown
50:36 queued 42:13
created

TicketStatusEnum   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 39
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getValues() 0 20 1
1
<?php
2
3
namespace EventEspresso\core\domain\services\graphql\enums;
4
5
use EE_Ticket;
6
use EventEspresso\core\services\graphql\enums\EnumBase;
7
8
/**
9
 * Class TicketStatusEnum
10
 * Description
11
 *
12
 * @package EventEspresso\core\domain\services\graphql\enums
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
     * @since $VID:$
33
     */
34
    protected function getValues()
35
    {
36
        return [
37
            'SOLD_OUT'     => [
38
                'value'       => EE_Ticket::sold_out,
39
            ],
40
            'EXPIRED'     => [
41
                'value'       => EE_Ticket::expired,
42
            ],
43
            'ARCHIVED'     => [
44
                'value'       => EE_Ticket::archived,
45
            ],
46
            'PENDING'     => [
47
                'value'       => EE_Ticket::pending,
48
            ],
49
            'ONSALE'     => [
50
                'value'       => EE_Ticket::onsale,
51
            ],
52
        ];
53
    }
54
}
55