File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -32,16 +32,16 @@ public function handle(): Response
3232 $ text = wordwrap ($ this ->article ->title (), self ::CHARACTERS_PER_LINE );
3333
3434 return Cache::remember (
35- 'articleSocialImage- ' . $ this ->article ->id ,
35+ 'articleSocialImage- ' . $ this ->article ->id ,
3636 now ()->addDay (),
37- fn () => response (
38- $ image ->read (resource_path ('images/ ' . self ::TEMPLATE ))
37+ fn () => response (
38+ $ image ->read (resource_path ('images/ ' . self ::TEMPLATE ))
3939 ->text (
4040 $ text ,
4141 self ::TEXT_X_POSITION ,
4242 self ::calculateTextYPosition ($ text ),
4343 function ($ font ) {
44- $ font ->file (resource_path ('fonts/ ' . self ::FONT ));
44+ $ font ->file (resource_path ('fonts/ ' . self ::FONT ));
4545 $ font ->size (self ::FONT_SIZE );
4646 $ font ->color (self ::TEXT_COLOUR );
4747 }
@@ -57,7 +57,7 @@ private function calculateTextYPosition(string $text): int
5757 {
5858 $ noOfLinesInText = substr_count ($ text , "\n" );
5959
60- return self ::TEXT_Y_BASE_POSITION
60+ return self ::TEXT_Y_BASE_POSITION
6161 + ((self ::FONT_SIZE * $ noOfLinesInText ) - $ noOfLinesInText );
6262 }
6363}
You can’t perform that action at this time.
0 commit comments