mirror of
https://github.com/Dannecron/test-php8-attributes.git
synced 2025-12-25 21:32:35 +03:00
initial commit
This commit is contained in:
14
src/Service/CachedJokes.php
Normal file
14
src/Service/CachedJokes.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
|
||||
#[\Attribute]
|
||||
class CachedJokes
|
||||
{
|
||||
public function getCacheKey(string $jokeType): string
|
||||
{
|
||||
return "jokes-{$jokeType}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user