1 | <?php |
||
2 | /** |
||
3 | * Created by PhpStorm. |
||
4 | * User: jgulledge |
||
5 | * Date: 9/30/2017 |
||
6 | * Time: 11:50 AM |
||
7 | */ |
||
8 | |||
9 | namespace LCI\Blend; |
||
10 | |||
11 | class Properties |
||
12 | { |
||
13 | |||
14 | /** @var array */ |
||
15 | protected $data = []; |
||
16 | |||
17 | /** |
||
18 | * Properties constructor. |
||
19 | */ |
||
20 | public function __construct() |
||
21 | { |
||
22 | |||
23 | } |
||
24 | |||
25 | /** |
||
26 | * @return array |
||
27 | */ |
||
28 | public function getData() |
||
29 | { |
||
30 | return $this->data; |
||
31 | } |
||
32 | |||
33 | |||
34 | /** |
||
35 | * @param string $name |
||
36 | * @param mixed $value |
||
37 | * |
||
38 | * @return $this |
||
39 | */ |
||
40 | public function setProperty($name, $value) |
||
41 | { |
||
42 | $this->data[$name] = $value; |
||
43 | |||
44 | return $this; |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @param array $data |
||
49 | * |
||
50 | * @return $this |
||
51 | */ |
||
52 | public function mergePropertiesFromArray(array $data = []) |
||
53 | { |
||
54 | if ($this->verifyArray($data)) { |
||
55 | $this->data = array_merge($data, $this->data); |
||
56 | } else { |
||
57 | // @TODO something |
||
58 | } |
||
59 | return $this; |
||
60 | } |
||
61 | |||
62 | protected function verifyArray($data) |
||
0 ignored issues
–
show
|
|||
63 | { |
||
64 | // @TODO |
||
65 | return true; |
||
66 | } |
||
67 | |||
68 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.