1 | <?php |
||
14 | abstract class AbstractDecorator extends AbstractCommon implements DecoratorInterface |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * Decorator is adding before cotext |
||
19 | */ |
||
20 | const PRE_CONTEXT = 'pre'; |
||
21 | |||
22 | |||
23 | /** |
||
24 | * Decorator is adding after context |
||
25 | */ |
||
26 | const POST_CONTEXT = 'post'; |
||
27 | |||
28 | |||
29 | /** |
||
30 | * Decorator reset context and return only new context |
||
31 | */ |
||
32 | const RESET_CONTEXT = 'reset'; |
||
33 | |||
34 | /** |
||
35 | * Collections of conditions objects |
||
36 | * @var array |
||
37 | */ |
||
38 | protected $conditions = array(); |
||
39 | |||
40 | /** |
||
41 | * Add new condition to decorator |
||
42 | * |
||
43 | * @param string $name |
||
44 | * @param array $options |
||
45 | * @return $this|null |
||
46 | */ |
||
47 | public function addCondition($name, $options) |
||
56 | |||
57 | /** |
||
58 | * Attach new condition |
||
59 | * |
||
60 | * @param Condition\AbstractCondition $condition |
||
61 | */ |
||
62 | protected function attachCondition($condition) |
||
66 | |||
67 | /** |
||
68 | * Check if all conditions are valid |
||
69 | * |
||
70 | * @return boolean |
||
71 | */ |
||
72 | public function validConditions() |
||
86 | } |
||
87 |
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: