From 97a2820d16d208842fb0c7886929ea6410d180bf Mon Sep 17 00:00:00 2001 From: dannc Date: Wed, 30 Dec 2020 15:34:12 +0700 Subject: [PATCH] move attributes to separate namespace. --- src/Operation/JokeOperation.php | 2 +- src/Service/{ => Attribute}/CachedJokes.php | 2 +- src/Service/JokeCachedService.php | 2 ++ src/Service/JokeService.php | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) rename src/Service/{ => Attribute}/CachedJokes.php (87%) diff --git a/src/Operation/JokeOperation.php b/src/Operation/JokeOperation.php index 7f8f193..6d02d73 100644 --- a/src/Operation/JokeOperation.php +++ b/src/Operation/JokeOperation.php @@ -4,7 +4,7 @@ declare(strict_types=1); namespace App\Operation; -use App\Service\CachedJokes; +use App\Service\Attribute\CachedJokes; use App\Service\JokeInterface; use Psr\SimpleCache\CacheInterface; use Psr\SimpleCache\InvalidArgumentException; diff --git a/src/Service/CachedJokes.php b/src/Service/Attribute/CachedJokes.php similarity index 87% rename from src/Service/CachedJokes.php rename to src/Service/Attribute/CachedJokes.php index a79683d..247e722 100644 --- a/src/Service/CachedJokes.php +++ b/src/Service/Attribute/CachedJokes.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Service; +namespace App\Service\Attribute; use Psr\SimpleCache\CacheInterface; diff --git a/src/Service/JokeCachedService.php b/src/Service/JokeCachedService.php index 13a70c6..0c14592 100644 --- a/src/Service/JokeCachedService.php +++ b/src/Service/JokeCachedService.php @@ -4,6 +4,8 @@ declare(strict_types=1); namespace App\Service; +use App\Service\Attribute\CachedJokes; + class JokeCachedService extends JokeService implements JokeInterface { #[CachedJokes] diff --git a/src/Service/JokeService.php b/src/Service/JokeService.php index d4befc4..d860a5a 100644 --- a/src/Service/JokeService.php +++ b/src/Service/JokeService.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace App\Service; +use App\Service\Attribute\JokeCategoryEnum; use GuzzleHttp\Client; use GuzzleHttp\Exception\GuzzleException; use GuzzleHttp\RequestOptions;