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

DatetimeLoader::getWhereParams()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace EventEspresso\core\domain\services\graphql\data\loaders;
4
5
use EEM_Datetime;
6
use EventEspresso\core\exceptions\InvalidDataTypeException;
7
use EventEspresso\core\exceptions\InvalidInterfaceException;
8
use InvalidArgumentException;
9
10
/**
11
 * Class DatetimeLoader
12
 */
13
class DatetimeLoader 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_Datetime::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
            'DTT_ID'      => ['IN', $keys],
40
            'DTT_deleted' => ['IN', [true, false]]
41
        ];
42
    }
43
}
44