Skip to content

Commit 90d3fb3

Browse files
committed
Updated exception.
Signed-off-by: Joshua Parker <[email protected]>
1 parent be59707 commit 90d3fb3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Support/LocalStorage.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use League\Flysystem\Local\LocalFilesystemAdapter;
88
use League\Flysystem\UnixVisibility\PortableVisibilityConverter;
99
use Qubus\Config\ConfigContainer;
10+
use Qubus\Exception\Data\TypeException;
1011
use Qubus\FileSystem\FileSystem;
1112

1213
use function Codefy\Framework\Helpers\config;
@@ -15,6 +16,9 @@
1516

1617
final class LocalStorage
1718
{
19+
/**
20+
* @throws TypeException
21+
*/
1822
public static function disk(?string $name = null): FileSystem
1923
{
2024
$name = $name ?? 'local';
@@ -24,11 +28,17 @@ public static function disk(?string $name = null): FileSystem
2428
return self::createInstanceOfLocalDriver($name, $config);
2529
}
2630

31+
/**
32+
* @throws TypeException
33+
*/
2734
private static function getConfigForDriverName(string $name): array|ConfigContainer
2835
{
2936
return config(key: "filesystem.disks.{$name}") ?? [];
3037
}
3138

39+
/**
40+
* @throws TypeException
41+
*/
3242
public static function createInstanceOfLocalDriver(string $name, array $configArray): FileSystem
3343
{
3444
$visibility = PortableVisibilityConverter::fromArray(
@@ -49,6 +59,9 @@ public static function createInstanceOfLocalDriver(string $name, array $configAr
4959
return new FileSystem(adapter: $adapter, configArray: $configArray);
5060
}
5161

62+
/**
63+
* @throws TypeException
64+
*/
5265
private static function setVisibilityConverterByDiskName(string $name): array
5366
{
5467
return [

0 commit comments

Comments
 (0)