BeforeInterceptor::invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
/*
5
 * Go! AOP framework
6
 *
7
 * @copyright Copyright 2011, Lisachenko Alexander <[email protected]>
8
 *
9
 * This source file is subject to the license that is bundled
10
 * with this source code in the file LICENSE.
11
 */
12
13
namespace Go\Aop\Framework;
14
15
use Go\Aop\AdviceBefore;
16
use Go\Aop\Intercept\Joinpoint;
17
18
/**
19
 * "Before" interceptor
20
 *
21
 * @api
22
 */
23
final class BeforeInterceptor extends AbstractInterceptor implements AdviceBefore
24
{
25
    /**
26
     * @inheritdoc
27 2
     */
28
    public function invoke(Joinpoint $joinpoint)
29 2
    {
30
        ($this->adviceMethod)($joinpoint);
31 2
32
        return $joinpoint->proceed();
33
    }
34
}
35