Skip to content

Commit 604d892

Browse files
committed
WIP
1 parent e9c3e76 commit 604d892

File tree

4 files changed

+27
-29
lines changed

4 files changed

+27
-29
lines changed

composer.lock

Lines changed: 20 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Helper/Filesystem.php

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44

55
namespace Flat3\Lodata\Helper;
66

7-
use Illuminate\Filesystem\FilesystemAdapter;
7+
use Flat3\Lodata\Traits\HasDisk;
88
use Illuminate\Support\Traits\ForwardsCalls;
99

1010
/**
11+
* Abstraction layer over Flysystem to provide the same API for some v1 and v3 calls.
12+
*
1113
* @method exists(string $path):bool;
1214
* @method get(string $path): string;
1315
* @method readStream(string $path): ?resource;
@@ -34,16 +36,7 @@
3436
abstract class Filesystem
3537
{
3638
use ForwardsCalls;
37-
38-
/** @var FilesystemAdapter $disk */
39-
protected $disk;
40-
41-
public function setDisk(FilesystemAdapter $disk): self
42-
{
43-
$this->disk = $disk;
44-
45-
return $this;
46-
}
39+
use HasDisk;
4740

4841
abstract public function listContents($directory = '', $recursive = false): ?iterable;
4942

tests/Helpers/PHPStanHelper.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44

55
use Symfony\Component\HttpFoundation\Response;
66

7-
class Response5 extends Response {
7+
class Response5 extends Response
8+
{
89
}

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function setUp(): void
114114

115115
// @phpstan-ignore-next-line
116116
Redis::flushdb();
117-
117+
118118
(new Filesystem)->cleanDirectory(TestFilesystemAdapter::root());
119119

120120
$this->setUpDriver();

0 commit comments

Comments
 (0)