Code Duplication    Length = 7-9 lines in 2 locations

src/AspectServiceProvider.php 1 location

@@ 50-58 (lines=9) @@
47
        $this->mergeConfigFrom($configPath, 'ytake-laravel-aop');
48
        $this->publishes([$configPath => config_path('ytake-laravel-aop.php')], 'aspect');
49
50
        $this->app->singleton('aspect.manager', function ($app) {
51
            $annotationConfiguration = new AnnotationConfiguration(
52
                $app['config']->get('ytake-laravel-aop.annotation')
53
            );
54
            $annotationConfiguration->ignoredAnnotations();
55
56
            // register annotation
57
            return new AspectManager($app);
58
        });
59
    }
60
61
    /**

src/LumenAspectServiceProvider.php 1 location

@@ 36-42 (lines=7) @@
33
    public function register()
34
    {
35
        $this->app->configure('ytake-laravel-aop');
36
        $this->app->singleton('aspect.manager', function ($app) {
37
            $annotationConfiguration = new AnnotationConfiguration(
38
                $app['config']->get('ytake-laravel-aop.annotation')
39
            );
40
            $annotationConfiguration->ignoredAnnotations();
41
            return new AspectManager($app);
42
        });
43
    }
44
}
45