Skip to content

Commit 732606e

Browse files
committed
Renamed classes
1 parent 92383da commit 732606e

15 files changed

Lines changed: 48 additions & 48 deletions
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
use League\Flysystem\Filesystem;
66
use League\Flysystem\UnableToReadFile;
77
use Sammyjo20\SaloonCachePlugin\Data\CachedResponse;
8-
use Sammyjo20\SaloonCachePlugin\Interfaces\CacheDriverInterface;
8+
use Sammyjo20\SaloonCachePlugin\Interfaces\DriverInterface;
99

10-
class FlysystemDriverInterface implements CacheDriverInterface
10+
class FlysystemDriver implements DriverInterface
1111
{
1212
/**
1313
* @param Filesystem $store

src/Drivers/LaravelCacheDriverInterface.php renamed to src/Drivers/LaravelCacheDriver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
use Illuminate\Contracts\Cache\Repository;
66
use Sammyjo20\SaloonCachePlugin\Data\CachedResponse;
7-
use Sammyjo20\SaloonCachePlugin\Interfaces\CacheDriverInterface;
7+
use Sammyjo20\SaloonCachePlugin\Interfaces\DriverInterface;
88

9-
class LaravelCacheDriverInterface implements CacheDriverInterface
9+
class LaravelCacheDriver implements DriverInterface
1010
{
1111
/**
1212
* @param Repository $store

src/Drivers/SimpleCacheDriverInterface.php renamed to src/Drivers/SimpleCacheDriver.php

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

55
use Psr\SimpleCache\CacheInterface;
66
use Sammyjo20\SaloonCachePlugin\Data\CachedResponse;
7-
use Sammyjo20\SaloonCachePlugin\Interfaces\CacheDriverInterface;
7+
use Sammyjo20\SaloonCachePlugin\Interfaces\DriverInterface;
88

99
/**
1010
* PSR-16 Cache Driver
1111
*/
12-
class SimpleCacheDriverInterface implements CacheDriverInterface
12+
class SimpleCacheDriver implements DriverInterface
1313
{
1414
/**
1515
* @param CacheInterface $store

src/Http/Middleware/ExplicitCacheMiddleware.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use GuzzleHttp\Promise\FulfilledPromise;
99
use Sammyjo20\Saloon\Http\SaloonRequest;
1010
use Sammyjo20\SaloonCachePlugin\Data\CachedResponse;
11-
use Sammyjo20\SaloonCachePlugin\Interfaces\CacheDriverInterface;
11+
use Sammyjo20\SaloonCachePlugin\Interfaces\DriverInterface;
1212

1313
class ExplicitCacheMiddleware
1414
{
@@ -22,9 +22,9 @@ class ExplicitCacheMiddleware
2222
/**
2323
* The cache driver used for caching.
2424
*
25-
* @var CacheDriverInterface
25+
* @var DriverInterface
2626
*/
27-
protected CacheDriverInterface $cacheDriver;
27+
protected DriverInterface $cacheDriver;
2828

2929
/**
3030
* The TTL in seconds.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Sammyjo20\SaloonCachePlugin\Data\CachedResponse;
66

7-
interface CacheDriverInterface
7+
interface DriverInterface
88
{
99
/**
1010
* Store the cached response on the driver.

src/Traits/AlwaysCacheResponses.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Sammyjo20\Saloon\Constants\Saloon;
66
use Sammyjo20\Saloon\Http\SaloonRequest;
77
use Sammyjo20\Saloon\Http\SaloonResponse;
8-
use Sammyjo20\SaloonCachePlugin\Interfaces\CacheDriverInterface;
8+
use Sammyjo20\SaloonCachePlugin\Interfaces\DriverInterface;
99
use Sammyjo20\SaloonCachePlugin\Http\Middleware\ExplicitCacheMiddleware;
1010

1111
trait AlwaysCacheResponses
@@ -145,7 +145,7 @@ public function invalidateCache(): self
145145
*
146146
* @return mixed
147147
*/
148-
abstract public function cacheDriver(): CacheDriverInterface;
148+
abstract public function cacheDriver(): DriverInterface;
149149

150150
/**
151151
* Define the cache TTL (Time-to-live) in seconds.

tests/Fixtures/Connectors/CachedConnector.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
use League\Flysystem\Filesystem;
66
use Sammyjo20\Saloon\Http\SaloonConnector;
77
use League\Flysystem\Local\LocalFilesystemAdapter;
8-
use Sammyjo20\SaloonCachePlugin\Interfaces\CacheDriverInterface;
9-
use Sammyjo20\SaloonCachePlugin\Drivers\FlysystemDriverInterface;
8+
use Sammyjo20\SaloonCachePlugin\Interfaces\DriverInterface;
9+
use Sammyjo20\SaloonCachePlugin\Drivers\FlysystemDriver;
1010
use Sammyjo20\SaloonCachePlugin\Traits\AlwaysCacheResponses;
1111

1212
class CachedConnector extends SaloonConnector
@@ -18,9 +18,9 @@ public function defineBaseUrl(): string
1818
return testApi();
1919
}
2020

21-
public function cacheDriver(): CacheDriverInterface
21+
public function cacheDriver(): DriverInterface
2222
{
23-
return new FlysystemDriverInterface(new Filesystem(new LocalFilesystemAdapter(cachePath())));
23+
return new FlysystemDriver(new Filesystem(new LocalFilesystemAdapter(cachePath())));
2424
}
2525

2626
public function cacheTTLInSeconds(): int

tests/Fixtures/Requests/AdvancedCustomKeyCachedUserRequest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
use Sammyjo20\Saloon\Constants\Saloon;
77
use Sammyjo20\Saloon\Http\SaloonRequest;
88
use League\Flysystem\Local\LocalFilesystemAdapter;
9-
use Sammyjo20\SaloonCachePlugin\Interfaces\CacheDriverInterface;
10-
use Sammyjo20\SaloonCachePlugin\Drivers\FlysystemDriverInterface;
9+
use Sammyjo20\SaloonCachePlugin\Interfaces\DriverInterface;
10+
use Sammyjo20\SaloonCachePlugin\Drivers\FlysystemDriver;
1111
use Sammyjo20\SaloonCachePlugin\Traits\AlwaysCacheResponses;
1212
use Sammyjo20\SaloonCachePlugin\Tests\Fixtures\Connectors\TestConnector;
1313

@@ -24,9 +24,9 @@ public function defineEndpoint(): string
2424
return '/user';
2525
}
2626

27-
public function cacheDriver(): CacheDriverInterface
27+
public function cacheDriver(): DriverInterface
2828
{
29-
return new FlysystemDriverInterface(new Filesystem(new LocalFilesystemAdapter(cachePath())));
29+
return new FlysystemDriver(new Filesystem(new LocalFilesystemAdapter(cachePath())));
3030
}
3131

3232
public function cacheTTLInSeconds(): int

tests/Fixtures/Requests/CachedPostRequest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
use Sammyjo20\Saloon\Http\SaloonRequest;
88
use Sammyjo20\Saloon\Traits\Plugins\HasJsonBody;
99
use League\Flysystem\Local\LocalFilesystemAdapter;
10-
use Sammyjo20\SaloonCachePlugin\Interfaces\CacheDriverInterface;
11-
use Sammyjo20\SaloonCachePlugin\Drivers\FlysystemDriverInterface;
10+
use Sammyjo20\SaloonCachePlugin\Interfaces\DriverInterface;
11+
use Sammyjo20\SaloonCachePlugin\Drivers\FlysystemDriver;
1212
use Sammyjo20\SaloonCachePlugin\Traits\AlwaysCacheResponses;
1313
use Sammyjo20\SaloonCachePlugin\Tests\Fixtures\Connectors\TestConnector;
1414

@@ -33,9 +33,9 @@ public function defaultData(): array
3333
];
3434
}
3535

36-
public function cacheDriver(): CacheDriverInterface
36+
public function cacheDriver(): DriverInterface
3737
{
38-
return new FlysystemDriverInterface(new Filesystem(new LocalFilesystemAdapter(cachePath())));
38+
return new FlysystemDriver(new Filesystem(new LocalFilesystemAdapter(cachePath())));
3939
}
4040

4141
public function cacheTTLInSeconds(): int

tests/Fixtures/Requests/CachedUserRequest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
use Sammyjo20\Saloon\Constants\Saloon;
77
use Sammyjo20\Saloon\Http\SaloonRequest;
88
use League\Flysystem\Local\LocalFilesystemAdapter;
9-
use Sammyjo20\SaloonCachePlugin\Interfaces\CacheDriverInterface;
10-
use Sammyjo20\SaloonCachePlugin\Drivers\FlysystemDriverInterface;
9+
use Sammyjo20\SaloonCachePlugin\Interfaces\DriverInterface;
10+
use Sammyjo20\SaloonCachePlugin\Drivers\FlysystemDriver;
1111
use Sammyjo20\SaloonCachePlugin\Traits\AlwaysCacheResponses;
1212
use Sammyjo20\SaloonCachePlugin\Tests\Fixtures\Connectors\TestConnector;
1313

@@ -24,9 +24,9 @@ public function defineEndpoint(): string
2424
return '/user';
2525
}
2626

27-
public function cacheDriver(): CacheDriverInterface
27+
public function cacheDriver(): DriverInterface
2828
{
29-
return new FlysystemDriverInterface(new Filesystem(new LocalFilesystemAdapter(cachePath())));
29+
return new FlysystemDriver(new Filesystem(new LocalFilesystemAdapter(cachePath())));
3030
}
3131

3232
public function cacheTTLInSeconds(): int

0 commit comments

Comments
 (0)