| Total Complexity | 4 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class GroupObserverClearCache |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var Repository |
||
| 14 | */ |
||
| 15 | private $cache; |
||
| 16 | |||
| 17 | 4 | public function __construct(Repository $cache) |
|
| 18 | { |
||
| 19 | 4 | $this->cache = $cache; |
|
| 20 | 4 | } |
|
| 21 | |||
| 22 | 2 | public function create(GroupModel $groupModel) |
|
| 26 | 2 | } |
|
| 27 | |||
| 28 | 1 | public function delete(GroupModel $group) |
|
| 29 | { |
||
| 30 | 1 | $this->cache->forget(GroupCache::class . '@count'); |
|
| 31 | 1 | $this->cache->forget(GroupCache::class . '@getById:' . $group->id()); |
|
| 32 | 1 | $this->cache->forget(GroupCache::class . '@getByDataProviderId:' . $group->dataProviderId()); |
|
| 33 | 1 | } |
|
| 34 | |||
| 35 | 1 | public function update(GroupModel $oldGroup, GroupModel $newGroup) |
|
| 41 | 1 | } |
|
| 42 | |||
| 43 | } |