Issues (97)

src/Properties.php (1 issue)

Severity
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
The parameter $data is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

62
    protected function verifyArray(/** @scrutinizer ignore-unused */ $data)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
63
    {
64
        // @TODO
65
        return true;
66
    }
67
68
}