1 | <?php |
||
22 | class listener implements EventSubscriberInterface |
||
23 | { |
||
24 | /** @var config */ |
||
25 | protected $config; |
||
26 | |||
27 | /** @var listener_helper */ |
||
28 | protected $helper; |
||
29 | |||
30 | /** @var request */ |
||
31 | protected $request; |
||
32 | |||
33 | /** @var twig */ |
||
34 | protected $template; |
||
35 | |||
36 | /** @var user */ |
||
37 | protected $user; |
||
38 | |||
39 | /* @var language */ |
||
40 | protected $language; |
||
41 | 29 | ||
42 | /** |
||
43 | 29 | * Constructor for listener |
|
44 | 29 | * |
|
45 | 29 | * @param config $config phpBB config |
|
46 | 29 | * @param listener_helper $helper Listener helper |
|
47 | 29 | * @param request_interface $request $request phpBB request |
|
48 | 29 | * @param template $template phpBB template |
|
49 | * @param user $user phpBB user |
||
50 | * @param language $language |
||
51 | */ |
||
52 | public function __construct(config $config, listener_helper $helper, request_interface $request, template $template, user $user, language $language) |
||
61 | 9 | ||
62 | 9 | /** |
|
63 | 11 | * Assign functions defined in this class to event listeners in the core |
|
64 | 11 | * |
|
65 | 9 | * @return array |
|
66 | 11 | * @static |
|
67 | 9 | */ |
|
68 | static public function getSubscribedEvents() : array |
||
80 | 3 | ||
81 | 3 | /** |
|
82 | * Check if request is ajax and output quickedit if it is |
||
83 | 2 | * |
|
84 | * @param object $event The event object |
||
85 | * @return void |
||
86 | 2 | */ |
|
87 | 2 | public function catch_ajax_requests($event) : void |
|
108 | 1 | ||
109 | 1 | /** |
|
110 | 1 | * Set ACP board settings |
|
111 | * |
||
112 | 1 | * @param object $event The event object |
|
113 | * @return void |
||
114 | 1 | */ |
|
115 | 1 | public function acp_board_settings($event) : void |
|
129 | 1 | ||
130 | /** |
||
131 | * Global quick edit enable/disable setting and button to enable in all forums |
||
132 | 1 | * |
|
133 | * @param int $value Value of quickedit settings. 1 if enabled, 0 if disabled |
||
134 | 1 | * @param string $key The key of the setting |
|
135 | * @return string HTML for quickedit settings |
||
136 | 1 | */ |
|
137 | static public function quickedit_settings(int $value, string $key) : string |
||
149 | 1 | ||
150 | /** |
||
151 | 1 | * Add quickedit settings to forums request data |
|
152 | 1 | * |
|
153 | 1 | * @param object $event The event object |
|
154 | 1 | * @return void |
|
155 | */ |
||
156 | public function add_forums_request_data($event) : void |
||
162 | |||
163 | 1 | /** |
|
164 | * Add quickedit flag to forums_flag |
||
165 | 1 | * |
|
166 | 1 | * @param object $event The event object |
|
167 | 1 | * @return void |
|
168 | 1 | */ |
|
169 | public function initialise_forums_flag_data($event) : void |
||
175 | |||
176 | /** |
||
177 | 1 | * Add quickedit setting to acp_forums settings |
|
178 | * |
||
179 | 1 | * @param object $event The event object |
|
180 | * @return void |
||
181 | 1 | */ |
|
182 | 1 | public function acp_forums_settings($event) : void |
|
190 | |||
191 | /** |
||
192 | * Update the forum_data_sql with the correct flag before submitting |
||
193 | 1 | * |
|
194 | * @param object $event The event object |
||
195 | 1 | * @return void |
|
196 | 1 | */ |
|
197 | 1 | public function acp_forums_update_data($event) : void |
|
204 | |||
205 | /** |
||
206 | * Check if quickedit is enabled and assign S_QUICK_EDIT accordingly |
||
207 | * |
||
208 | 1 | * @param object $event The event object |
|
209 | * @return void |
||
210 | */ |
||
211 | 1 | public function check_quickedit_enabled($event) : void |
|
222 | } |
||
223 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..