IsInMethodMatcher::matchesClass()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 2
1
<?php
2
/**
3
 * This file is part of the Ray.AuraSqlModule package.
4
 *
5
 * @license http://opensource.org/licenses/MIT MIT
6
 */
7
namespace Ray\AuraSqlModule;
8
9
use Ray\Aop\AbstractMatcher;
10
11
class IsInMethodMatcher extends AbstractMatcher
12
{
13
    /**
14
     * {@inheritdoc}
15
     *
16
     * @codeCoverageIgnore
17
     */
18
    public function matchesClass(\ReflectionClass $class, array $arguments)
19
    {
20
        return true;
21
    }
22
23
    /**
24
     * {@inheritdoc}
25
     */
26 3
    public function matchesMethod(\ReflectionMethod $method, array $arguments)
27
    {
28 3
        $result = \in_array($method->name, $arguments[0], true);
29
30 3
        return $result;
31
    }
32
}
33