From 5c576ddc5aed6f18331c141c4a9888ce77366783 Mon Sep 17 00:00:00 2001 From: Abdullah Karam Date: Tue, 26 Dec 2023 15:05:13 +0200 Subject: [PATCH] Update PHPDocs --- src/Services/LaravelSvg.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Services/LaravelSvg.php b/src/Services/LaravelSvg.php index 8ab9889..b26f8f2 100644 --- a/src/Services/LaravelSvg.php +++ b/src/Services/LaravelSvg.php @@ -28,7 +28,7 @@ public function __construct( protected string $lastWord = '', protected bool $withLogoText = false, protected string $svgTemplate = '', - protected int $wordsCount = 0 + protected int $wordsCount = 0 ) { $this->settings = config('laravel-svg'); @@ -38,6 +38,7 @@ public function __construct( * @param $key * @return string */ + protected function getSetting($key): string { if (isset($this->settings[$key]) && !empty($this->settings[$key])) { @@ -128,13 +129,13 @@ protected function saveSvg(): array } else { $svgName = $this->firstWord . '-' . $this->lastWord . '.svg'; } - File::put(public_path($this->getSetting('folder').'/'.$this->getSetting('default_svg_path')).'/'.$svgName, $this->svgTemplate); + File::put(public_path($this->getSetting('folder') . '/' . $this->getSetting('default_svg_path')) . '/' . $svgName, $this->svgTemplate); return [ 'name' => $svgName, 'path' => $this->getSetting('default_svg_path') . '/' . $svgName, - 'full_path' => asset($this->getSetting('folder').'/'.$this->getSetting('default_svg_path')).'/'.$svgName, + 'full_path' => asset($this->getSetting('folder') . '/' . $this->getSetting('default_svg_path')) . '/' . $svgName, 'mime_type' => self::DEFAULT_SVG_TYPE, - 'size' => File::size(public_path($this->getSetting('folder').'/'.$this->getSetting('default_svg_path')).'/'.$svgName), + 'size' => File::size(public_path($this->getSetting('folder') . '/' . $this->getSetting('default_svg_path')) . '/' . $svgName), 'disk' => 'public' ]; } @@ -145,8 +146,8 @@ protected function saveSvg(): array */ protected function checkDisk(): void { - if (!File::exists(public_path($this->getSetting('folder').'/'.$this->getSetting('default_svg_path')))) { - File::makeDirectory(public_path($this->getSetting('folder').'/'.$this->getSetting('default_svg_path'))); + if (!File::exists(public_path($this->getSetting('folder') . '/' . $this->getSetting('default_svg_path')))) { + File::makeDirectory(public_path($this->getSetting('folder') . '/' . $this->getSetting('default_svg_path'))); } }