Completed
Branch BUG-10626-dst-unit-test (cc62a6)
by
unknown
37:15 queued 23:58
created

TicketSelector   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A ticketOptionByEventIdSelector() 0 4 1
A ticketSelectionSubmitSelectorByEventId() 0 4 1
1
<?php
2
namespace Page;
3
4
/**
5
 * TicketSelector
6
 * Selectors/References to elements for the Ticket Selector.
7
 *
8
 * @package Page
9
 * @author  Darren Ethier
10
 * @since   1.0.0
11
 */
12
class TicketSelector
13
{
14
15
    /**
16
     * Return the selector for the ticket option select input for the given event id.
17
     * @param int|string $event_id
18
     * @return string
19
     */
20
    public static function ticketOptionByEventIdSelector($event_id)
21
    {
22
        return "//select[@id='ticket-selector-tbl-qty-slct-$event_id-1']";
23
    }
24
25
26
    /**
27
     * Return the selector for the submit button for the ticket selector for the given event id.
28
     * @param int|string $event_id
29
     * @return string
30
     */
31
    public static function ticketSelectionSubmitSelectorByEventId($event_id)
32
    {
33
        return "#ticket-selector-submit-$event_id-btn";
34
    }
35
}