Code Duplication    Length = 19-20 lines in 2 locations

src/PointCut/LogExceptionsPointCut.php 1 location

@@ 30-48 (lines=19) @@
27
/**
28
 * Class LogExceptionsPointCut
29
 */
30
class LogExceptionsPointCut extends CommonPointCut implements PointCutable
31
{
32
    /** @var string */
33
    protected $annotation = LogExceptions::class;
34
35
    /**
36
     * @param Container $app
37
     *
38
     * @return \Ray\Aop\Pointcut
39
     */
40
    public function configure(Container $app): Pointcut
41
    {
42
        $interceptor = new LogExceptionsInterceptor;
43
        $interceptor->setLogger($app['Psr\Log\LoggerInterface']);
44
        $this->setInterceptor($interceptor);
45
46
        return $this->withAnnotatedAnyInterceptor();
47
    }
48
}
49

src/PointCut/QueryLogPointCut.php 1 location

@@ 30-49 (lines=20) @@
27
/**
28
 * Class QueryLogPointCut
29
 */
30
class QueryLogPointCut extends CommonPointCut implements PointCutable
31
{
32
    /** @var string */
33
    protected $annotation = QueryLog::class;
34
35
    /**
36
     * @param Container $app
37
     *
38
     * @return \Ray\Aop\Pointcut
39
     */
40
    public function configure(Container $app): Pointcut
41
    {
42
        $interceptor = new QueryLogInterceptor;
43
        $interceptor->setLogger($app['Psr\Log\LoggerInterface']);
44
        $interceptor->setDispatcher($app['Illuminate\Contracts\Events\Dispatcher']);
45
        $this->setInterceptor($interceptor);
46
47
        return $this->withAnnotatedAnyInterceptor();
48
    }
49
}
50