Completed
Branch EDTR/master (da238f)
by
unknown
09:58 queued 01:23
created

WordPressPageEditor   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\routing\specifications\admin;
4
5
use EventEspresso\core\domain\entities\routing\specifications\MatchAnyRouteSpecification;
6
use EventEspresso\core\services\request\RequestInterface;
7
8
/**
9
 * Class WordPressPageEditor
10
 * Composite MatchAnyRouteSpecification using WordPressPageEditorEdit and WordPressPageEditorAddNew
11
 * that will return true if either of the supplied Route Match Specifications returns true
12
 *  ie: returns true when the current request is for the WordPress Page editor
13
 *      regardless of whether the user is editing or creating a new page
14
 *
15
 * @package EventEspresso\core\domain\entities\routing\specifications\admin
16
 * @author  Brent Christensen
17
 * @since   4.9.71.p
18
 */
19
class WordPressPageEditor extends MatchAnyRouteSpecification
20
{
21
    /**
22
     * WordPressPostsEditor constructor.
23
     *
24
     * @param WordPressPostsEditorEdit $edit_page_route_match
25
     * @param WordPressPostsEditorAddNew $create_page_route_match
26
     * @param RequestInterface           $request
27
     * @throws \EventEspresso\core\exceptions\InvalidEntityException
28
     */
29
    public function __construct(
30
        WordPressPageEditorEdit $edit_page_route_match,
31
        WordPressPageEditorAddNew $create_page_route_match,
32
        RequestInterface $request
33
    ) {
34
        parent::__construct(
35
            array($edit_page_route_match, $create_page_route_match),
36
            $request
37
        );
38
    }
39
}
40