Skip to content

Commit

Permalink
Code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
batumibiz committed Jun 11, 2024
1 parent 82c9ed7 commit 77cb0af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private function setLetterCase(string $string, string $fontName): string
*/
private function prepareFontsList(): array
{
$list = glob(realpath($this->imageOptions->getFontsFolder()) . DIRECTORY_SEPARATOR . '*.ttf');
$list = glob($this->imageOptions->getFontsFolder() . DIRECTORY_SEPARATOR . '*.ttf');

if ([] === $list || false === $list) {
throw new LogicException('The specified folder does not contain any fonts.');
Expand Down
2 changes: 1 addition & 1 deletion src/ImageOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function setFontsFolder(string|Stringable $folder): self

public function getFontsFolder(): string
{
return realpath($this->fontsFolder);
return (string) realpath($this->fontsFolder);
}

public function setFontShuffle(bool $shuffle): self
Expand Down

0 comments on commit 77cb0af

Please sign in to comment.