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

AbstractMatcher   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
matchesClass() 0 1 ?
matchesMethod() 0 1 ?
A getArguments() 0 4 1
A __construct() 0 4 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;
8
9
abstract class AbstractMatcher
10
{
11
    /**
12
     * @var array
13
     */
14
    protected $arguments = [];
15
16 51
    public function __construct()
17
    {
18 51
        $this->arguments = func_get_args();
19 51
    }
20
21
    /**
22
     * @param \ReflectionClass $class
23
     * @param array            $arguments
24
     *
25
     * @return bool
26
     */
27
    abstract public function matchesClass(\ReflectionClass $class, array $arguments);
28
29
    /**
30
     * @param \ReflectionMethod $method
31
     * @param array             $arguments
32
     *
33
     * @return bool
34
     */
35
    abstract public function matchesMethod(\ReflectionMethod $method, array $arguments);
36
37
    /**
38
     * Return matching condition arguments
39
     *
40
     * @return array
41
     */
42 43
    public function getArguments()
43
    {
44 43
        return $this->arguments;
45
    }
46
}
47