Criteria::getContact()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://flipboxfactory.com/software/force/license
6
 * @link       https://www.flipboxfactory.com/software/force/
7
 */
8
9
namespace flipbox\craft\hubspot\web\twig\variables;
10
11
use flipbox\craft\hubspot\criteria\CompanyCriteria;
12
use flipbox\craft\hubspot\criteria\ContactCriteria;
13
use yii\base\Component;
14
15
/**
16
 * @author Flipbox Factory <[email protected]>
17
 * @since 1.0.3
18
 */
19
class Criteria extends Component
20
{
21
    /**
22
     * @param array $properties
23
     * @return CompanyCriteria
24
     */
25
    public function getCompany(array $properties = []): CompanyCriteria
26
    {
27
        $criteria = (new CompanyCriteria())
28
            ->populate($properties);
29
30
        return $criteria;
31
    }
32
33
    /**
34
     * @param array $properties
35
     * @return ContactCriteria
36
     */
37
    public function getContact(array $properties = []): ContactCriteria
38
    {
39
        $criteria = (new ContactCriteria())
40
            ->populate($properties);
41
42
        return $criteria;
43
    }
44
}
45