Passed
Push — main ( f1d53c...b55a20 )
by Ahmad
02:35
created

SafeSearch   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 14
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A conditionals() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AhmadMayahi\Vision\Data;
6
7
use AhmadMayahi\Vision\Enums\Likelihood;
8
use AhmadMayahi\Vision\Support\AbstractConditionalLikelihood;
9
10
/**
11
 * @method bool isAdult($likelihood = Likelihood::VERY_LIKELY)
12
 * @method bool isMedical($likelihood = Likelihood::VERY_LIKELY)
13
 * @method bool isSpoof($likelihood = Likelihood::VERY_LIKELY)
14
 * @method bool isViolence($likelihood = Likelihood::VERY_LIKELY)
15
 * @method bool isRacy($likelihood = Likelihood::VERY_LIKELY)
16
 *
17
 * @see https://cloud.google.com/vision/docs/reference/rpc/google.cloud.vision.v1#safesearchannotation
18
 */
19
final class SafeSearch extends AbstractConditionalLikelihood
20
{
21
    public function __construct(
22
        public string $adult,
23
        public string $medical,
24
        public string $spoof,
25
        public string $violence,
26
        public string $racy
27
    ) {
28
    }
29
30
    protected function conditionals(): array
31
    {
32
        return [];
33
    }
34
}
35