BlogPostCriteria::all()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 0
cts 11
cp 0
rs 9.8666
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/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\BlogPosts;
12
use Psr\Http\Message\ResponseInterface;
13
14
/**
15
 * @author Flipbox Factory <[email protected]>
16
 * @since 2.0.0
17
 */
18
class BlogPostCriteria extends AbstractCriteria
19
{
20
    use ConnectionTrait,
21
        CacheTrait,
22
        IdAttributeTrait,
23
        ParamsAttributeTrait;
24
25
    /**
26
     * @param array $criteria
27
     * @param array $config
28
     * @return ResponseInterface
29
     * @throws \Exception
30
     */
31
    public function all(array $criteria = [], array $config = []): ResponseInterface
32
    {
33
        $this->populate($criteria);
34
35
        return BlogPosts::all(
36
            $this->getParams(),
37
            $this->getConnection(),
38
            $this->getCache(),
39
            $this->getLogger(),
40
            $config
41
        );
42
    }
43
}
44