Completed
Push — develop ( d125ce...d62c8c )
by Nate
11:11
created

Resources::getLimit()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
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\services;
10
11
use yii\di\ServiceLocator;
12
13
/**
14
 * @author Flipbox Factory <[email protected]>
15
 * @since 1.0.0
16
 */
17
class Resources extends ServiceLocator
18
{
19
    /**
20
     * @inheritdoc
21
     */
22 3
    public function init()
23
    {
24 3
        parent::init();
25
26 3
        $this->setComponents([
27 3
            resources\Companies::HUBSPOT_RESOURCE => resources\Companies::class,
28 3
            resources\CompanyContacts::HUBSPOT_RESOURCE => resources\CompanyContacts::class,
29 3
            resources\Contacts::HUBSPOT_RESOURCE => resources\Contacts::class,
30 3
            resources\ContactLists::HUBSPOT_RESOURCE => resources\ContactLists::class,
31 3
            resources\ContactListContacts::HUBSPOT_RESOURCE => resources\ContactListContacts::class,
32 3
            resources\Limit::HUBSPOT_RESOURCE => resources\Limit::class,
33 3
            resources\TimelineEvents::HUBSPOT_RESOURCE => resources\TimelineEvents::class
34
        ]);
35 3
    }
36
37
    /**
38
     * @noinspection PhpDocMissingThrowsInspection
39
     * @return resources\Companies
40
     */
41
    public function getCompanies(): resources\Companies
42
    {
43
        /** @noinspection PhpUnhandledExceptionInspection */
44
        /** @noinspection PhpIncompatibleReturnTypeInspection */
45
        return $this->get(resources\Companies::HUBSPOT_RESOURCE);
46
    }
47
48
    /**
49
     * @noinspection PhpDocMissingThrowsInspection
50
     * @return resources\CompanyContacts
51
     */
52
    public function getCompanyContacts(): resources\CompanyContacts
53
    {
54
        /** @noinspection PhpUnhandledExceptionInspection */
55
        /** @noinspection PhpIncompatibleReturnTypeInspection */
56
        return $this->get(resources\CompanyContacts::HUBSPOT_RESOURCE);
57
    }
58
59
    /**
60
     * @noinspection PhpDocMissingThrowsInspection
61
     * @return resources\Contacts
62
     */
63
    public function getContacts(): resources\Contacts
64
    {
65
        /** @noinspection PhpUnhandledExceptionInspection */
66
        /** @noinspection PhpIncompatibleReturnTypeInspection */
67
        return $this->get(resources\Contacts::HUBSPOT_RESOURCE);
68
    }
69
70
    /**
71
     * @noinspection PhpDocMissingThrowsInspection
72
     * @return resources\ContactLists
73
     */
74
    public function getContactLists(): resources\ContactLists
75
    {
76
        /** @noinspection PhpUnhandledExceptionInspection */
77
        /** @noinspection PhpIncompatibleReturnTypeInspection */
78
        return $this->get(resources\ContactLists::HUBSPOT_RESOURCE);
79
    }
80
81
    /**
82
     * @noinspection PhpDocMissingThrowsInspection
83
     * @return resources\ContactListContacts
84
     */
85
    public function getContactListContacts(): resources\ContactListContacts
86
    {
87
        /** @noinspection PhpUnhandledExceptionInspection */
88
        /** @noinspection PhpIncompatibleReturnTypeInspection */
89
        return $this->get(resources\ContactListContacts::HUBSPOT_RESOURCE);
90
    }
91
92
    /**
93
     * @noinspection PhpDocMissingThrowsInspection
94
     * @return resources\Limit
95
     */
96
    public function getLimit(): resources\Limit
97
    {
98
        /** @noinspection PhpUnhandledExceptionInspection */
99
        /** @noinspection PhpIncompatibleReturnTypeInspection */
100
        return $this->get(resources\Limit::HUBSPOT_RESOURCE);
101
    }
102
103
    /**
104
     * @noinspection PhpDocMissingThrowsInspection
105
     * @return resources\TimelineEvents
106
     */
107
    public function getTimelineEvents(): resources\TimelineEvents
108
    {
109
        /** @noinspection PhpUnhandledExceptionInspection */
110
        /** @noinspection PhpIncompatibleReturnTypeInspection */
111
        return $this->get(resources\TimelineEvents::HUBSPOT_RESOURCE);
112
    }
113
}
114