ClearMediaCache   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
c 0
b 0
f 0
dl 0
loc 12
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handle() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
namespace App\Listeners;
4
5
use App\Services\MediaCacheService;
6
7
class ClearMediaCache
8
{
9
    private $mediaCacheService;
10
11 7
    public function __construct(MediaCacheService $mediaCacheService)
12
    {
13 7
        $this->mediaCacheService = $mediaCacheService;
14 7
    }
15
16 7
    public function handle(): void
17
    {
18 7
        $this->mediaCacheService->clear();
19 7
    }
20
}
21