Completed
Branch Gutenberg/master (3b2a95)
by
unknown
118:45 queued 105:17
created

EspressoEventEditor   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 EspressoEventEditorEdit and EspressoEventEditorAddNew
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 Event editor
14
 *      regardless of whether the user is editing or creating a new event
15
 *
16
 * @package EventEspresso\core\domain\entities\route_match\specifications
17
 * @author  Brent Christensen
18
 * @since   $VID:$
19
 */
20
class EspressoEventEditor extends MatchAnyRouteSpecification
21
{
22
    /**
23
     * AddNewOrEditEventAdminPageRouteMatch constructor.
24
     *
25
     * @param EspressoEventEditorEdit   $edit_event_route_match
26
     * @param EspressoEventEditorAddNew $create_event_route_match
27
     * @param RequestInterface          $request
28
     * @throws InvalidEntityException
29
     */
30
    public function __construct(
31
        EspressoEventEditorEdit $edit_event_route_match,
32
        EspressoEventEditorAddNew $create_event_route_match,
33
        RequestInterface $request
34
    ) {
35
        parent::__construct(
36
            array($edit_event_route_match, $create_event_route_match),
37
            $request
38
        );
39
    }
40
}
41