Completed
Push — master ( 5701cd...3770db )
by Dmitry
05:00
created

ServerResourceStub   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 1
cbo 2
dl 0
loc 19
ccs 0
cts 11
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A decorator() 0 8 2
A __get() 0 4 1
1
<?php
2
/**
3
 * Finance module for HiPanel
4
 *
5
 * @link      https://github.com/hiqdev/hipanel-module-finance
6
 * @package   hipanel-module-finance
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hipanel\modules\finance\models\stubs;
12
13
use hipanel\modules\finance\models\decorators\server\AbstractServerResourceDecorator;
14
use hipanel\modules\finance\models\decorators\server\ServerResourceDecoratorFactory;
15
16
class ServerResourceStub extends AbstractResourceStub
17
{
18
    /**
19
     * @return AbstractServerResourceDecorator
20
     */
21
    public function decorator()
22
    {
23
        if (empty($this->decorator)) {
24
            $this->decorator = ServerResourceDecoratorFactory::createFromResource($this);
25
        }
26
27
        return $this->decorator;
28
    }
29
30
    public function __get($value)
31
    {
32
        return null;
33
    }
34
}
35