Completed
Branch 2.x (867c01)
by Akihito
09:30
created

LogicalNotMatcher   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 2
c 2
b 0
f 1
lcom 0
cbo 1
dl 0
loc 26
ccs 8
cts 8
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A matchesClass() 0 8 1
A matchesMethod() 0 8 1
1
<?php
2
/**
3
 * This file is part of the Ray.Aop package
4
 *
5
 * @license http://opensource.org/licenses/bsd-license.php BSD
6
 */
7
namespace Ray\Aop\Matcher;
8
9
use Ray\Aop\AbstractMatcher;
10
11
class LogicalNotMatcher extends AbstractMatcher
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16 2
    public function matchesClass(\ReflectionClass $class, array $arguments)
17
    {
18 2
        list($matcher) = $arguments;
19
        /* @var $matcher AbstractMatcher */
20 2
        $isNot = ! $matcher->matchesClass($class, $matcher->getArguments());
21
22 2
        return $isNot;
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28 1
    public function matchesMethod(\ReflectionMethod $method, array $arguments)
29
    {
30 1
        list($matcher) = $arguments;
31
        /* @var $matcher AbstractMatcher */
32 1
        $isNot = ! $matcher->matchesMethod($method, [$arguments]);
33
34 1
        return $isNot;
35
    }
36
}
37