InstanceCriteria   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 4
dl 0
loc 56
ccs 0
cts 30
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A describe() 0 11 1
A limits() 0 11 1
A resources() 0 11 1
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://github.com/flipbox/salesforce/blob/master/LICENSE.md
6
 * @link       https://github.com/flipbox/salesforce
7
 */
8
9
namespace Flipbox\Salesforce\Criteria;
10
11
use Flipbox\Salesforce\Resources\Instance;
12
use Psr\Http\Message\ResponseInterface;
13
14
/**
15
 * @author Flipbox Factory <[email protected]>
16
 * @since 3.3.0
17
 */
18
class InstanceCriteria extends AbstractCriteria
19
{
20
    use ConnectionTrait,
21
        CacheTrait;
22
23
    /**
24
     * @param array $criteria
25
     * @param array $config
26
     * @return ResponseInterface
27
     */
28
    public function describe(array $criteria = [], array $config = []): ResponseInterface
29
    {
30
        $this->populate($criteria);
31
32
        return Instance::describe(
33
            $this->getConnection(),
34
            $this->getCache(),
35
            $this->getLogger(),
36
            $config
37
        );
38
    }
39
40
    /**
41
     * @param array $criteria
42
     * @param array $config
43
     * @return ResponseInterface
44
     */
45
    public function limits(array $criteria = [], array $config = []): ResponseInterface
46
    {
47
        $this->populate($criteria);
48
49
        return Instance::limits(
50
            $this->getConnection(),
51
            $this->getCache(),
52
            $this->getLogger(),
53
            $config
54
        );
55
    }
56
57
    /**
58
     * @param array $criteria
59
     * @param array $config
60
     * @return ResponseInterface
61
     */
62
    public function resources(array $criteria = [], array $config = []): ResponseInterface
63
    {
64
        $this->populate($criteria);
65
66
        return Instance::resources(
67
            $this->getConnection(),
68
            $this->getCache(),
69
            $this->getLogger(),
70
            $config
71
        );
72
    }
73
}
74