Completed
Branch EDTR/graphql-data-loaders (8642bb)
by
unknown
09:27 queued 44s
created

EspressoEditor   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A registerLoaders() 0 13 1
1
<?php
2
3
namespace EventEspresso\core\domain\services\graphql\data\domains;
4
5
use EventEspresso\core\domain\services\graphql\data\loaders as Loaders;
6
use EventEspresso\core\services\graphql\loaders\GQLDataDomainInterface;
7
use WPGraphQL\AppContext;
8
9
/**
10
 * Class EspressoEditor
11
 * Description
12
 *
13
 * @package EventEspresso\core\domain\services\graphql\data\domains
14
 * @author  Brent Christensen
15
 * @since   $VID:$
16
 */
17
class EspressoEditor implements GQLDataDomainInterface
18
{
19
20
    /**
21
     * @param array      $loaders The loaders accessible in the AppContext
22
     * @param AppContext $context The AppContext
23
     * @return array
24
     * @return array
25
     * @since $VID:$
26
     */
27
    public function registerLoaders($loaders, $context)
28
    {
29
        $newLoaders = [
30
            'espresso_attendee'  => new Loaders\AttendeeLoader($context),
31
            'espresso_datetime'  => new Loaders\DatetimeLoader($context),
32
            'espresso_price'     => new Loaders\PriceLoader($context),
33
            'espresso_priceType' => new Loaders\PriceTypeLoader($context),
34
            'espresso_ticket'    => new Loaders\TicketLoader($context),
35
            'espresso_venue'     => new Loaders\VenueLoader($context),
36
        ];
37
38
        return array_merge($loaders, $newLoaders);
39
    }
40
}
41