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

MiscPipe::__construct()   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\MiscCategorizer;
7
use App\Services\Categorization\ReleaseContext;
8
9
/**
10
 * Pipe for miscellaneous content and hash detection.
11
 * This runs last as a fallback.
12
 */
13
class MiscPipe extends AbstractCategorizationPipe
14
{
15
    protected int $priority = 100;
16
    private MiscCategorizer $categorizer;
17
18
    public function __construct()
19
    {
20
        $this->categorizer = new MiscCategorizer();
21
    }
22
23
    public function getName(): string
24
    {
25
        return 'Misc';
26
    }
27
28
    protected function categorize(ReleaseContext $context): CategorizationResult
29
    {
30
        return $this->categorizer->categorize($context);
31
    }
32
}
33
34