1 | <?php |
||
18 | class Dialog extends Module\Module |
||
19 | { |
||
20 | /** |
||
21 | * array of the module |
||
22 | * |
||
23 | * @var array |
||
24 | */ |
||
25 | |||
26 | protected static $_moduleArray = |
||
27 | [ |
||
28 | 'name' => 'Dialog', |
||
29 | 'alias' => 'Dialog', |
||
30 | 'author' => 'Redaxmedia', |
||
31 | 'description' => 'JavaScript powered dialog', |
||
32 | 'version' => '4.0.0' |
||
33 | ]; |
||
34 | |||
35 | /** |
||
36 | * array of the option |
||
37 | * |
||
38 | * @var array |
||
39 | */ |
||
40 | |||
41 | protected $_optionArray = |
||
42 | [ |
||
43 | 'className' => |
||
44 | [ |
||
45 | 'overlay' => 'rs-overlay-dialog', |
||
46 | 'component' => 'rs-component-dialog', |
||
47 | 'title' => 'rs-title-dialog', |
||
48 | 'box' => 'rs-box-dialog', |
||
49 | 'field' => 'rs-field-default rs-field-text', |
||
50 | 'button' => 'rs-button-default', |
||
51 | 'buttonOk' => 'js-ok', |
||
52 | 'buttonCancel' => 'js-cancel' |
||
53 | ] |
||
54 | ]; |
||
55 | |||
56 | /** |
||
57 | * renderStart |
||
58 | * |
||
59 | * @since 4.0.0 |
||
60 | */ |
||
61 | |||
62 | public function renderStart() : void |
||
106 | |||
107 | /** |
||
108 | * alert |
||
109 | * |
||
110 | * @since 4.0.0 |
||
111 | * |
||
112 | * @param string $message message of the alert |
||
113 | * @param string $title title of the alert |
||
114 | * |
||
115 | * @return string |
||
116 | */ |
||
117 | |||
118 | public function alert(string $message = null, string $title = null) : string |
||
122 | |||
123 | /** |
||
124 | * confirm |
||
125 | * |
||
126 | * @since 4.0.0 |
||
127 | * |
||
128 | * @param string $message message of the confirm |
||
129 | * @param string $title title of the confirm |
||
130 | * |
||
131 | * @return string |
||
132 | */ |
||
133 | |||
134 | public function confirm(string $message = null, string $title = null) : string |
||
138 | |||
139 | /** |
||
140 | * prompt |
||
141 | * |
||
142 | * @since 4.0.0 |
||
143 | * |
||
144 | * @param string $message message of the prompt |
||
145 | * @param string $title title of the prompt |
||
146 | * |
||
147 | * @return string |
||
148 | */ |
||
149 | |||
150 | public function prompt(string $message = null, string $title = null) : string |
||
154 | |||
155 | /** |
||
156 | * dialog |
||
157 | * |
||
158 | * @since 4.0.0 |
||
159 | * |
||
160 | * @param string $type type of the dialog |
||
161 | * @param string $message message of the dialog |
||
162 | * @param string $title title of the dialog |
||
163 | * |
||
164 | * @return string |
||
165 | */ |
||
166 | |||
167 | protected function _dialog(string $type = null, string $message = null, string $title = null) : string |
||
240 | } |
||
241 |
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: