Completed
Push — develop ( f37ae4...1d947e )
by Nate
18:30
created

Resources   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 37
ccs 0
cts 16
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A init() 0 9 1
A getCompanies() 0 6 1
A getContacts() 0 6 1
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
    public function init()
23
    {
24
        parent::init();
25
26
        $this->setComponents([
27
            'companies' => resources\Companies::class,
28
            'contacts' => resources\Contacts::class
29
        ]);
30
    }
31
32
    /**
33
     * @noinspection PhpDocMissingThrowsInspection
34
     * @return resources\Companies
35
     */
36
    public function getCompanies(): resources\Companies
37
    {
38
        /** @noinspection PhpUnhandledExceptionInspection */
39
        /** @noinspection PhpIncompatibleReturnTypeInspection */
40
        return $this->get('companies');
41
    }
42
43
    /**
44
     * @noinspection PhpDocMissingThrowsInspection
45
     * @return resources\Contacts
46
     */
47
    public function getContacts(): resources\Contacts
48
    {
49
        /** @noinspection PhpUnhandledExceptionInspection */
50
        /** @noinspection PhpIncompatibleReturnTypeInspection */
51
        return $this->get('contacts');
52
    }
53
}
54