| Total Complexity | 3 | 
| Total Lines | 57 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 10 | abstract class AbstractQueryCacheAttribute extends AbstractQuery | ||
| 11 | { | ||
| 12 | /** | ||
| 13 | * Inherit cache methods | ||
| 14 | */ | ||
| 15 | use Cacheable; | ||
| 16 | |||
| 17 | /** | ||
| 18 | * Target Model | ||
| 19 | * | ||
| 20 | * @var Model | ||
| 21 | */ | ||
| 22 | protected $model; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * Model's attribute to cache | ||
| 26 | * | ||
| 27 | * @var string | ||
| 28 | */ | ||
| 29 | protected $attribute; | ||
| 30 | |||
| 31 | /** | ||
| 32 | * Model ID | ||
| 33 | * | ||
| 34 | * @var int | ||
| 35 | */ | ||
| 36 | public $model_key; | ||
| 37 | |||
| 38 | /** | ||
| 39 | * QueryCacheAttribute constructor. | ||
| 40 | * | ||
| 41 | * @param int $model_key | ||
| 42 | */ | ||
| 43 | public function __construct(int $model_key) | ||
| 46 | } | ||
| 47 | |||
| 48 | /** | ||
| 49 | * Retrieve a Service's title | ||
| 50 | * | ||
| 51 | * @return string | ||
| 52 | */ | ||
| 53 | public function execute(): string | ||
| 56 | } | ||
| 57 | |||
| 58 | /** | ||
| 59 | * Key to use for cache store | ||
| 60 | * | ||
| 61 | * @return string | ||
| 62 | */ | ||
| 63 | public function cacheKey(): string | ||
| 69 |