Completed
Push — master ( 6e9196...c55090 )
by Nate
02:30
created

ContactBatchMutator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A batch() 0 11 1
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://github.com/flipbox/hubspot/blob/master/LICENSE.md
6
 * @link       https://github.com/flipbox/hubspot
7
 */
8
9
namespace Flipbox\HubSpot\Criteria;
10
11
use Flipbox\HubSpot\Resources\Contact;
12
use Psr\Http\Message\ResponseInterface;
13
14
/**
15
 * @author Flipbox Factory <[email protected]>
16
 * @since 2.0.0
17
 */
18
class ContactBatchMutator extends AbstractCriteria
19
{
20
    use ConnectionTrait,
21
        PayloadAttributeTrait;
22
23
    /**
24
     * @param array $criteria
25
     * @param array $config
26
     * @return ResponseInterface
27
     */
28
    public function batch(array $criteria = [], array $config = []): ResponseInterface
29
    {
30
        $this->populate($criteria);
31
32
        return Contact::batch(
33
            $this->getPayload(),
34
            $this->getConnection(),
35
            $this->getLogger(),
36
            $config
37
        );
38
    }
39
}
40