11<?php namespace Arcanedev \Gravatar ;
22
3- use Arcanedev \Support \PackageServiceProvider as ServiceProvider ;
3+ use Arcanedev \Support \Providers \PackageServiceProvider ;
4+ use Illuminate \Contracts \Support \DeferrableProvider ;
45
56/**
67 * Class GravatarServiceProvider
78 *
89 * @package Arcanedev\Gravatar
910 * @author ARCANEDEV <arcanedev.maroc@gmail.com>
1011 */
11- class GravatarServiceProvider extends ServiceProvider
12+ class GravatarServiceProvider extends PackageServiceProvider implements DeferrableProvider
1213{
1314 /* -----------------------------------------------------------------
1415 | Properties
@@ -22,13 +23,6 @@ class GravatarServiceProvider extends ServiceProvider
2223 */
2324 protected $ package = 'gravatar ' ;
2425
25- /**
26- * Indicates if loading of the provider is deferred.
27- *
28- * @var bool
29- */
30- protected $ defer = true ;
31-
3226 /* -----------------------------------------------------------------
3327 | Main Methods
3428 | -----------------------------------------------------------------
@@ -37,31 +31,26 @@ class GravatarServiceProvider extends ServiceProvider
3731 /**
3832 * Register the service provider.
3933 */
40- public function register ()
34+ public function register (): void
4135 {
4236 parent ::register ();
4337
4438 $ this ->registerConfig ();
4539
4640 $ this ->singleton (Contracts \Gravatar::class, function ($ app ) {
47- /** @var \Illuminate\Contracts\Config\Repository $config */
48- $ config = $ app ['config ' ];
49-
5041 return new Gravatar (
51- $ config ->get ('gravatar.default ' , 'mm ' ),
52- $ config ->get ('gravatar.size ' , 80 ),
53- $ config ->get ('gravatar.max-rating ' , 'g ' )
42+ $ app [ ' config ' ] ->get ('gravatar.default ' , 'mm ' ),
43+ $ app [ ' config ' ] ->get ('gravatar.size ' , 80 ),
44+ $ app [ ' config ' ] ->get ('gravatar.max-rating ' , 'g ' )
5445 );
5546 });
5647 }
5748
5849 /**
5950 * Boot the service provider.
6051 */
61- public function boot ()
52+ public function boot (): void
6253 {
63- parent ::boot ();
64-
6554 $ this ->publishConfig ();
6655 }
6756
@@ -70,7 +59,7 @@ public function boot()
7059 *
7160 * @return array
7261 */
73- public function provides ()
62+ public function provides (): array
7463 {
7564 return [
7665 Contracts \Gravatar::class,
0 commit comments