Completed
Branch BUG/reg-status-change-recursio... (2db0c9)
by
unknown
20:03 queued 10:32
created

MatchAllRouteSpecifications::isMatchingRoute()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 9

Duplication

Lines 9
Ratio 100 %

Importance

Changes 0
Metric Value
cc 3
nc 3
nop 0
dl 9
loc 9
rs 9.9666
c 0
b 0
f 0
1
<?php
2
3
namespace EventEspresso\core\domain\entities\route_match;
4
5
/**
6
 * Class MatchAllRouteSpecifications
7
 * Returns true if ALL of the supplied Route Match Specifications also return true
8
 * ie: supplied Route Match Specifications joined using AND logic
9
 *
10
 * @package EventEspresso\core\domain\entities\route_match
11
 * @author  Brent Christensen
12
 * @since   $VID:$
13
 */
14 View Code Duplication
class MatchAllRouteSpecifications extends MultiRouteSpecification
15
{
16
17
    /**
18
     * returns true if current request matches specification
19
     *
20
     * @since $VID:$
21
     * @return boolean
22
     */
23
    public function isMatchingRoute()
24
    {
25
        foreach ($this->specifications as $specification) {
26
            if (! $specification->isMatchingRoute()) {
27
                return false;
28
            }
29
        }
30
        return true;
31
    }
32
}
33