Code Duplication    Length = 46-46 lines in 2 locations

examples/AwsZipStreamServiceProvider.php 1 location

@@ 8-53 (lines=46) @@
5
use Illuminate\Support\ServiceProvider;
6
use limenet\S3BucketStreamZip\S3BucketStreamZip;
7
8
class AWSZipStreamServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Indicates if loading of the provider is deferred.
12
     *
13
     * @var bool
14
     */
15
    protected $defer = true;
16
17
    /**
18
     * Bootstrap the application services.
19
     *
20
     * @return void
21
     */
22
    public function boot()
23
    {
24
25
    }
26
27
    /**
28
     * Register the application services.
29
     *
30
     * @return void
31
     */
32
    public function register()
33
    {
34
        $this->app->bind(S3BucketStreamZip::class, function($_) {
35
            return new S3BucketStreamZip([
36
                'key'     => config('services.s3.key'),
37
                'secret'  => config('services.s3.secret'),
38
                'region'  => config('services.s3.region'),
39
                'version' => config('services.s3.version'),
40
            ]);
41
        });
42
    }
43
44
    /**
45
     * Get the services provided by the provider.
46
     *
47
     * @return array
48
     */
49
    public function provides()
50
    {
51
        return [S3BucketStreamZip::class];
52
    }
53
}
54

src/AwsZipStreamServiceProvider.php 1 location

@@ 7-52 (lines=46) @@
4
5
use Illuminate\Support\ServiceProvider;
6
7
class AWSZipStreamServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Indicates if loading of the provider is deferred.
11
     *
12
     * @var bool
13
     */
14
    protected $defer = true;
15
16
    /**
17
     * Bootstrap the application services.
18
     *
19
     * @return void
20
     */
21
    public function boot()
22
    {
23
24
    }
25
26
    /**
27
     * Register the application services.
28
     *
29
     * @return void
30
     */
31
    public function register()
32
    {
33
        $this->app->bind(S3BucketStreamZip::class, function($_) {
34
            return new S3BucketStreamZip([
35
                'key'     => config('services.s3.key'),
36
                'secret'  => config('services.s3.secret'),
37
                'region'  => config('services.s3.region'),
38
                'version' => config('services.s3.version'),
39
            ]);
40
        });
41
    }
42
43
    /**
44
     * Get the services provided by the provider.
45
     *
46
     * @return array
47
     */
48
    public function provides()
49
    {
50
        return [S3BucketStreamZip::class];
51
    }
52
}
53