| 1 | <?php |
||
| 10 | class ObjectRadio extends RadioElement |
||
| 11 | { |
||
| 12 | /** @var Proxy */ |
||
| 13 | protected $proxy; |
||
| 14 | |||
| 15 | 3 | public function getProxy() : Proxy |
|
| 16 | { |
||
| 17 | 3 | if ($this->proxy === null) { |
|
| 18 | $this->proxy = new Proxy(); |
||
| 19 | } |
||
| 20 | |||
| 21 | 3 | return $this->proxy; |
|
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param array|Traversable $options |
||
| 26 | * |
||
| 27 | * {@inheritDoc} |
||
| 28 | */ |
||
| 29 | public function setOptions($options) : self |
||
| 30 | { |
||
| 31 | $this->getProxy()->setOptions($options); |
||
|
|
|||
| 32 | |||
| 33 | return parent::setOptions($options); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param mixed $value |
||
| 38 | * |
||
| 39 | * {@inheritDoc} |
||
| 40 | */ |
||
| 41 | 1 | public function setOption($key, $value) : self |
|
| 42 | { |
||
| 43 | 1 | $this->getProxy()->setOptions([$key => $value]); |
|
| 44 | |||
| 45 | 1 | return parent::setOption($key, $value); |
|
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * {@inheritDoc} |
||
| 50 | */ |
||
| 51 | public function setValue($value) |
||
| 55 | |||
| 56 | /** |
||
| 57 | * {@inheritDoc} |
||
| 58 | */ |
||
| 59 | 2 | public function getValueOptions() |
|
| 73 | } |
||
| 74 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: