Criteria   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 26
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getCompany() 0 7 1
A getContact() 0 7 1
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