UpdateComposer::getJsonData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
abstract class UpdateComposer extends Object
4
{
5
    protected $composerJsonObj = null;
6
7
    public function __construct($composerJsonObj)
8
    {
9
        $this->composerJsonObj = $composerJsonObj;
10
        if (! $this->composerJsonObj->getJsonData()) {
11
            user_error('No Json data!');
12
        }
13
    }
14
15
    abstract public function run();
16
17
    /**
18
     * @return array
19
     */
20
    protected function getJsonData()
21
    {
22
        return $this->composerJsonObj->getJsonData();
23
    }
24
25
    /**
26
     * @param array $array [description]
27
     */
28
    protected function setJsonData(array $array)
29
    {
30
        $this->composerJsonObj->setJsonData($array);
31
    }
32
}
33