Completed
Branch EDTR/master (0d7008)
by
unknown
34:37 queued 26:06
created

TicketLoader::getQuery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace EventEspresso\core\domain\services\graphql\data\loaders;
4
5
use EEM_Ticket;
6
use EventEspresso\core\exceptions\InvalidDataTypeException;
7
use EventEspresso\core\exceptions\InvalidInterfaceException;
8
use InvalidArgumentException;
9
10
/**
11
 * Class TickeLoader
12
 */
13
class TicketLoader extends AbstractLoader
14
{
15
    /**
16
     * @return EE_Base_Class
17
     * @throws EE_Error
18
     * @throws InvalidArgumentException
19
     * @throws InvalidDataTypeException
20
     * @throws InvalidInterfaceException
21
     */
22
    protected function getQuery()
23
    {
24
        return EEM_Ticket::instance();
25
    }
26
27
    /**
28
     * @param array $keys
29
     *
30
     * @return array
31
     * @throws EE_Error
32
     * @throws InvalidArgumentException
33
     * @throws InvalidDataTypeException
34
     * @throws InvalidInterfaceException
35
     */
36
    protected function getWhereParams(array $keys)
37
    {
38
        return [
39
            'TKT_ID'      => ['IN', $keys],
40
            'TKT_deleted' => ['IN', [true, false]]
41
        ];
42
    }
43
}
44