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

ServerResourceStub::decorator()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 8
ccs 0
cts 7
cp 0
rs 9.4285
cc 2
eloc 4
nc 2
nop 0
crap 6
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