StandardApi   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 46
ccs 12
cts 12
cp 1
rs 10
c 1
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setLinks() 0 5 1
A setMeta() 0 5 1
A setQuerystring() 0 5 1
A setBreadcrumb() 0 5 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