Image::setMentions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Swader\Diffbot\Api;
4
5
use Swader\Diffbot\Abstracts\Api;
6
use Swader\Diffbot\Traits\StandardApi;
7
8
class Image extends Api
9
{
10
    use StandardApi;
11
12
    /** @var string API URL to which to send the request */
13
    protected $apiUrl = 'https://api.diffbot.com/v3/image';
14
15
    /**
16
     * Tells the API call to return the mentions field
17
     * @see https://www.diffbot.com/dev/docs/image/
18
     * @param bool|mixed $bool
19
     * @return $this
20
     */
21 1
    public function setMentions($bool)
22
    {
23 1
        $this->fieldSettings['mentions'] = (bool)$bool;
24 1
        return $this;
25
    }
26
27
    /**
28
     * Sets the API call to return the faces field
29
     * @see https://www.diffbot.com/dev/docs/image/
30
     * @param bool|mixed $bool
31
     * @return $this
32
     */
33 1
    public function setFaces($bool)
34
    {
35 1
        $this->fieldSettings['faces'] = (bool)$bool;
36 1
        return $this;
37
    }
38
39
    /**
40
     * Sets the API call to return the ocr field.
41
     * @see https://www.diffbot.com/dev/docs/image/
42
     * @param bool|mixed $bool
43
     * @return $this
44
     */
45 1
    public function setOcr($bool)
46
    {
47 1
        $this->fieldSettings['ocr'] = (bool)$bool;
48 1
        return $this;
49
    }
50
}
51