Passed
Push — master ( 179943...1193c4 )
by Darko
09:13
created

TvPipe::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Services\Categorization\Pipes;
4
5
use App\Services\Categorization\CategorizationResult;
6
use App\Services\Categorization\Categorizers\TvCategorizer;
7
use App\Services\Categorization\ReleaseContext;
8
9
/**
10
 * Pipe for TV content categorization.
11
 */
12
class TvPipe extends AbstractCategorizationPipe
13
{
14
    protected int $priority = 20;
15
    private TvCategorizer $categorizer;
16
17
    public function __construct()
18
    {
19
        $this->categorizer = new TvCategorizer();
20
    }
21
22
    public function getName(): string
23
    {
24
        return 'TV';
25
    }
26
27
    protected function shouldSkip(ReleaseContext $context): bool
28
    {
29
        return $this->categorizer->shouldSkip($context);
30
    }
31
32
    protected function categorize(ReleaseContext $context): CategorizationResult
33
    {
34
        return $this->categorizer->categorize($context);
35
    }
36
}
37
38