StandardApi::setLinks()   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\Traits;
4
5
/**
6
 * Trait StandardApi
7
 * @package Swader\Diffbot\Traits
8
 * @property $fieldSettings array
9
 */
10
trait StandardApi {
11
12
    /**
13
     * Makes the API call return the links field, common to all standard API types
14
     * @param bool|mixed $bool
15
     * @return $this
16
     */
17 11
    public function setLinks($bool)
18
    {
19 11
        $this->fieldSettings['links'] = (bool)$bool;
20 11
        return $this;
21
    }
22
23
    /**
24
     * Makes the API call return the meta field, common to all standard API types
25
     * @param bool|mixed $bool
26
     * @return $this
27
     */
28 15
    public function setMeta($bool)
29
    {
30 15
        $this->fieldSettings['meta'] = (bool)$bool;
31 15
        return $this;
32
    }
33
34
    /**
35
     * Makes the API call return the querystring field, common to all standard API types
36
     * @param bool|mixed $bool
37
     * @return $this
38
     */
39 7
    public function setQuerystring($bool)
40
    {
41 7
        $this->fieldSettings['querystring'] = (bool)$bool;
42 7
        return $this;
43
    }
44
45
    /**
46
     * Makes the API call return the breadcrumb field, common to all standard API types
47
     * @param bool|mixed $bool
48
     * @return $this
49
     */
50 7
    public function setBreadcrumb($bool)
51
    {
52 7
        $this->fieldSettings['breadcrumb'] = (bool)$bool;
53 7
        return $this;
54
    }
55
}
56