Code Duplication    Length = 17-18 lines in 2 locations

core/domain/entities/routing/specifications/admin/EspressoEventsListTable.php 1 location

@@ 15-31 (lines=17) @@
12
 * @author  Brent Christensen
13
 * @since   4.9.71.p
14
 */
15
class EspressoEventsListTable extends RouteMatchSpecification
16
{
17
    /**
18
     * returns true if current request matches specification
19
     *
20
     * @since 4.9.71.p
21
     * @return boolean
22
     */
23
    public function isMatchingRoute()
24
    {
25
        return $this->request->getRequestParam('page') === 'espresso_events'
26
            && (
27
                $this->request->getRequestParam('action') === 'default'
28
                || $this->request->requestParamIsSet('action') === false
29
            );
30
    }
31
}
32

core/domain/entities/routing/specifications/admin/EspressoStandardPostTypeEditor.php 1 location

@@ 15-32 (lines=18) @@
12
 * @author  Brent Christensen
13
 * @since   4.9.71.p
14
 */
15
class EspressoStandardPostTypeEditor extends RouteMatchSpecification
16
{
17
18
    /**
19
     * returns true if current request matches specification
20
     *
21
     * @since 4.9.71.p
22
     * @return boolean
23
     */
24
    public function isMatchingRoute()
25
    {
26
        return $this->request->getMatch('espresso_*') !== false
27
               && (
28
                   $this->request->getRequestParam('action') === 'edit'
29
                   || $this->request->getRequestParam('action') === 'create_new'
30
               );
31
    }
32
}
33