| Total Complexity | 2 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | trait ServicesTrait |
||
| 24 | { |
||
| 25 | // Public Methods |
||
| 26 | // ========================================================================= |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @inheritdoc |
||
| 30 | */ |
||
| 31 | public function __construct($id, $parent = null, array $config = []) |
||
| 32 | { |
||
| 33 | $config['components'] = [ |
||
| 34 | 'cache' => CacheService::class, |
||
| 35 | ]; |
||
| 36 | |||
| 37 | parent::__construct($id, $parent, $config); |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Returns the nutritionApi service |
||
| 42 | * |
||
| 43 | * @return CacheService The cache service |
||
| 44 | * @throws InvalidConfigException |
||
| 45 | */ |
||
| 46 | public function getCache(): CacheService |
||
| 49 | } |
||
| 50 | } |
||
| 51 |