4
4
5
5
use Illuminate \Http \Response ;
6
6
use Intervention \Image \Image ;
7
- use Intervention \Image \ImageManager ;
8
7
use Intervention \Image \AbstractFont ;
8
+ use Intervention \Image \ImageManager ;
9
9
use BeyondCode \LaravelFavicon \Favicon ;
10
10
use Intervention \Image \Gd \Font as GdFont ;
11
11
use Intervention \Image \Imagick \Font as ImagickFont ;
@@ -26,7 +26,7 @@ public function __construct(Favicon $favicon)
26
26
$ this ->favicon = $ favicon ;
27
27
28
28
$ this ->manager = new ImageManager ([
29
- 'driver ' => config ('favicon.image_driver ' )
29
+ 'driver ' => config ('favicon.image_driver ' ),
30
30
]);
31
31
32
32
$ this ->environment = config ('app.env ' );
@@ -41,7 +41,7 @@ public function generate(string $icon): Response
41
41
42
42
$ font = $ this ->getFont ($ this ->favicon ->getFaviconText ($ this ->environment ));
43
43
44
- $ font ->file (config ('favicon.font ' ) ?? __DIR__ . '/../../resources/fonts/OpenSans-Regular.ttf ' );
44
+ $ font ->file (config ('favicon.font ' ) ?? __DIR__ . '/../../resources/fonts/OpenSans-Regular.ttf ' );
45
45
46
46
$ font ->valign ('top ' );
47
47
@@ -73,10 +73,10 @@ protected function calculateDynamicFontSize(AbstractFont $font, Image $icon, $pa
73
73
{
74
74
$ size = $ font ->getBoxSize ();
75
75
76
- while ($ size [" width " ] + $ paddingX > $ icon ->width () && $ font ->getSize () > 0 ) {
76
+ while ($ size [' width ' ] + $ paddingX > $ icon ->width () && $ font ->getSize () > 0 ) {
77
77
$ fontSize = $ font ->getSize ();
78
78
79
- $ font ->size ($ fontSize- 1 );
79
+ $ font ->size ($ fontSize - 1 );
80
80
81
81
$ size = $ font ->getBoxSize ();
82
82
}
@@ -97,4 +97,4 @@ public function shouldGenerateFavicon(): bool
97
97
{
98
98
return config ('favicon.enabled_environments. ' .$ this ->environment ) !== null ;
99
99
}
100
- }
100
+ }
0 commit comments