ClearMediaCache::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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