From 89660d93f9897d231e9113ba203cd17f4c5efade Mon Sep 17 00:00:00 2001 From: driesvints Date: Wed, 7 Feb 2024 16:09:20 +0000 Subject: [PATCH] Fix code styling --- src/Factory.php | 6 +++--- src/IconsManifest.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Factory.php b/src/Factory.php index 0d87653..1ed1aae 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -30,7 +30,7 @@ final class Factory public function __construct( Filesystem $filesystem, IconsManifest $manifest, - FilesystemFactory $disks = null, + ?FilesystemFactory $disks = null, array $config = [] ) { $this->filesystem = $filesystem; @@ -177,7 +177,7 @@ private function contents(string $set, string $name): string throw SvgNotFound::missing($set, $name); } - private function getSvgFromPath(string $name, string $path, string $disk = null): string + private function getSvgFromPath(string $name, string $path, ?string $disk = null): string { $contents = trim($this->filesystem($disk)->get(sprintf( '%s/%s.svg', @@ -250,7 +250,7 @@ private function buildClass(string $set, string $class): string /** * @return \Illuminate\Contracts\Filesystem\Filesystem|Filesystem */ - private function filesystem(string $disk = null) + private function filesystem(?string $disk = null) { return $this->disks && $disk ? $this->disks->disk($disk) : $this->filesystem; } diff --git a/src/IconsManifest.php b/src/IconsManifest.php index f93a6bc..f75d331 100644 --- a/src/IconsManifest.php +++ b/src/IconsManifest.php @@ -20,7 +20,7 @@ final class IconsManifest private ?array $manifest = null; - public function __construct(Filesystem $filesystem, string $manifestPath, FilesystemFactory $disks = null) + public function __construct(Filesystem $filesystem, string $manifestPath, ?FilesystemFactory $disks = null) { $this->filesystem = $filesystem; $this->manifestPath = $manifestPath; @@ -65,7 +65,7 @@ private function build(array $sets): array /** * @return \Illuminate\Contracts\Filesystem\Filesystem|Filesystem */ - private function filesystem(string $disk = null) + private function filesystem(?string $disk = null) { return $this->disks && $disk ? $this->disks->disk($disk) : $this->filesystem; }