InstanceCriteria::resources()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 0
cts 10
cp 0
rs 9.9
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 2
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