Completed
Push — master ( 719266...e4b221 )
by Nate
06:18 queued 04:34
created

ObjectAssociationQuery::prepare()   B

Complexity

Conditions 7
Paths 2

Size

Total Lines 19

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 56

Importance

Changes 0
Metric Value
dl 0
loc 19
ccs 0
cts 16
cp 0
rs 8.8333
c 0
b 0
f 0
cc 7
nc 2
nop 1
crap 56
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://flipboxfactory.com/software/hubspot/license
6
 * @link       https://www.flipboxfactory.com/software/hubspot/
7
 */
8
9
namespace flipbox\hubspot\db;
10
11
use flipbox\craft\integration\db\IntegrationAssociationQuery;
12
use flipbox\hubspot\HubSpot;
13
use flipbox\hubspot\records\ObjectAssociation;
14
15
/**
16
 * @author Flipbox Factory <[email protected]>
17
 * @since 1.0.0
18
 *
19
 * @method ObjectAssociation[] all()
20
 * @method ObjectAssociation one()
21
 * @method ObjectAssociation[] getCachedResult()
22
 */
23
class ObjectAssociationQuery extends IntegrationAssociationQuery
24
{
25
    /**
26
     * @inheritdoc
27
     * @throws /\Throwable
28
     */
29
    public function __construct($modelClass, $config = [])
30
    {
31
        HubSpot::getInstance()->getObjectAssociations()->ensureTableExists();
32
        parent::__construct($modelClass, $config);
33
    }
34
}
35