Completed
Push — develop ( 3de0c5...33aaf9 )
by Adam
8s
created

CreatableFromArrayModel::getParam()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace IBM\Watson\Common\stubs;
6
7
use IBM\Watson\Common\Model\CreatableFromArray;
8
9
/**
10
 * Stub class, does nothing.
11
 */
12
class CreatableFromArrayModel implements CreatableFromArray
13
{
14
    /**
15
     * @var string
16
     */
17
    private $param;
18
19
    /**
20
     * CreatableFromArray constructor.
21
     *
22
     * @param string $param
23
     */
24
    public function __construct($param)
25
    {
26
        $this->param = $param;
27
    }
28
29
    /**
30
     * @param array $data
31
     *
32
     * @return \IBM\Watson\Common\Model\CreatableFromArray
33
     */
34
    public static function create(array $data): CreatableFromArray
35
    {
36
        return new self($data['param']);
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getParam(): string
43
    {
44
        return $this->param;
45
    }
46
}
47