Completed
Branch Gutenberg/event-attendees-bloc... (683e90)
by
unknown
39:01 queued 25:57
created

EspressoVenueEditor   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
1
<?php
2
3
namespace EventEspresso\core\domain\entities\route_match\specifications\admin;
4
5
use EventEspresso\core\domain\entities\route_match\MatchAnyRouteSpecification;
6
use EventEspresso\core\exceptions\InvalidEntityException;
7
use EventEspresso\core\services\request\RequestInterface;
8
9
/**
10
 * Class EspressoEventEditor
11
 * Composite MatchAnyRouteSpecification using EspressoVenueEditorEdit and EspressoVenueEditorAddNew
12
 * that will return true if either of the supplied Route Match Specifications returns true
13
 *  ie: returns true when the current request is for the Espresso Venue editor
14
 *      regardless of whether the user is editing or creating a new venue
15
 *
16
 * @package EventEspresso\core\domain\entities\route_match\specifications
17
 * @author  Brent Christensen
18
 * @since   $VID:$
19
 */
20
class EspressoVenueEditor extends MatchAnyRouteSpecification
21
{
22
    /**
23
     * EspressoVenueEditor constructor.
24
     *
25
     * @param EspressoVenueEditorEdit $edit_venue_route_match
26
     * @param EspressoVenueEditorAddNew $create_venue_route_match
27
     * @param RequestInterface          $request
28
     * @throws InvalidEntityException
29
     */
30
    public function __construct(
31
        EspressoVenueEditorEdit $edit_venue_route_match,
32
        EspressoVenueEditorAddNew $create_venue_route_match,
33
        RequestInterface $request
34
    ) {
35
        parent::__construct(
36
            array($edit_venue_route_match, $create_venue_route_match),
37
            $request
38
        );
39
    }
40
}
41