Completed
Pull Request — master (#351)
by Leny
06:37
created

WidgetOptionsContainer   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 4
c 1
b 1
f 0
lcom 1
cbo 0
dl 0
loc 41
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getOptions() 0 4 1
A setOptions() 0 4 1
A add() 0 4 1
1
<?php
2
3
namespace Victoire\Bundle\WidgetBundle\Form;
4
5
class WidgetOptionsContainer
6
{
7
    /**
8
     * @var array
9
     */
10
    private $options;
11
12
    /**
13
     * WidgetOptionsContainer constructor.
14
     *
15
     * @param array $options
16
     */
17
    public function __construct($options = [])
18
    {
19
        $this->options = $options;
20
    }
21
22
    /**
23
     * @return array
24
     */
25
    public function getOptions()
26
    {
27
        return $this->options;
28
    }
29
30
    /**
31
     * @param array $options
32
     */
33
    public function setOptions($options)
34
    {
35
        $this->options = $options;
36
    }
37
38
    /**
39
     * @param array $options
0 ignored issues
show
Bug introduced by
There is no parameter named $options. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
40
     */
41
    public function add($key, $value)
42
    {
43
        $this->options[$key] = $value;
44
    }
45
}
46