44
55use Illuminate \Http \Response ;
66use Intervention \Image \Image ;
7- use Intervention \Image \ImageManager ;
87use Intervention \Image \AbstractFont ;
8+ use Intervention \Image \ImageManager ;
99use BeyondCode \LaravelFavicon \Favicon ;
1010use Intervention \Image \Gd \Font as GdFont ;
1111use Intervention \Image \Imagick \Font as ImagickFont ;
@@ -26,7 +26,7 @@ public function __construct(Favicon $favicon)
2626 $ this ->favicon = $ favicon ;
2727
2828 $ this ->manager = new ImageManager ([
29- 'driver ' => config ('favicon.image_driver ' )
29+ 'driver ' => config ('favicon.image_driver ' ),
3030 ]);
3131
3232 $ this ->environment = config ('app.env ' );
@@ -41,7 +41,7 @@ public function generate(string $icon): Response
4141
4242 $ font = $ this ->getFont ($ this ->favicon ->getFaviconText ($ this ->environment ));
4343
44- $ font ->file (config ('favicon.font ' ) ?? __DIR__ . '/../../resources/fonts/OpenSans-Regular.ttf ' );
44+ $ font ->file (config ('favicon.font ' ) ?? __DIR__ . '/../../resources/fonts/OpenSans-Regular.ttf ' );
4545
4646 $ font ->valign ('top ' );
4747
@@ -73,10 +73,10 @@ protected function calculateDynamicFontSize(AbstractFont $font, Image $icon, $pa
7373 {
7474 $ size = $ font ->getBoxSize ();
7575
76- while ($ size [" width " ] + $ paddingX > $ icon ->width () && $ font ->getSize () > 0 ) {
76+ while ($ size [' width ' ] + $ paddingX > $ icon ->width () && $ font ->getSize () > 0 ) {
7777 $ fontSize = $ font ->getSize ();
7878
79- $ font ->size ($ fontSize- 1 );
79+ $ font ->size ($ fontSize - 1 );
8080
8181 $ size = $ font ->getBoxSize ();
8282 }
@@ -97,4 +97,4 @@ public function shouldGenerateFavicon(): bool
9797 {
9898 return config ('favicon.enabled_environments. ' .$ this ->environment ) !== null ;
9999 }
100- }
100+ }
0 commit comments