Completed
Pull Request — master (#24)
by yuuki
02:14
created

LogExceptionsPointCut   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 2
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 6 1
1
<?php
2
3
/**
4
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
6
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
7
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
8
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
9
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
10
 * THE SOFTWARE.
11
 *
12
 * This software consists of voluntary contributions made by many individuals
13
 * and is licensed under the MIT license.
14
 *
15
 * Copyright (c) 2015-2016 Yuuki Takezawa
16
 *
17
 */
18
namespace Ytake\LaravelAspect\PointCut;
19
20
use Illuminate\Contracts\Container\Container;
21
use Ytake\LaravelAspect\Interceptor\LogExceptionsInterceptor;
22
23
/**
24
 * Class LogExceptionsPointCut
25
 */
26
class LogExceptionsPointCut extends CommonPointCut implements PointCutable
27
{
28
    /** @var string */
29
    protected $annotation = \Ytake\LaravelAspect\Annotation\LogExceptions::class;
30
31
    /**
32
     * @param Container $app
33
     *
34
     * @return \Ray\Aop\Pointcut
35
     */
36
    public function configure(Container $app)
37
    {
38
        $this->setInterceptor(new LogExceptionsInterceptor);
39
40
        return $this->withAnnotatedAnyInterceptor($app);
41
    }
42
}
43