@@ -58,7 +58,7 @@ function questions_experts_only_answer(): bool {
5858 *
5959 * @return bool
6060 */
61- function questions_is_expert (\ElggEntity $ container = null , \ElggUser $ user = null ): bool {
61+ function questions_is_expert (? \ElggEntity $ container = null , ? \ElggUser $ user = null ): bool {
6262 if (!questions_experts_enabled ()) {
6363 return false ;
6464 }
@@ -226,7 +226,7 @@ function questions_get_group_access_level(\ElggGroup $group) {
226226 *
227227 * @return int
228228 */
229- function questions_get_solution_time (\ElggEntity $ container = null ): int {
229+ function questions_get_solution_time (? \ElggEntity $ container = null ): int {
230230 static $ plugin_setting ;
231231
232232 if (!isset ($ plugin_setting )) {
@@ -270,11 +270,11 @@ function questions_limited_to_groups(): bool {
270270 * Check if a user can ask a question in a container
271271 *
272272 * @param null|\ElggEntity $container the container to check (default: page_owner)
273- * @param null|\ElggUser $user the user askting the question (default: current user)
273+ * @param null|\ElggUser $user the user asking the question (default: current user)
274274 *
275275 * @return bool
276276 */
277- function questions_can_ask_question (\ElggEntity $ container = null , \ElggUser $ user = null ): bool {
277+ function questions_can_ask_question (? \ElggEntity $ container = null , ? \ElggUser $ user = null ): bool {
278278 // default to page owner
279279 if (!$ container instanceof \ElggEntity) {
280280 $ container = elgg_get_page_owner_entity ();
@@ -300,12 +300,12 @@ function questions_can_ask_question(\ElggEntity $container = null, \ElggUser $us
300300/**
301301 * Check if a user can answer a question
302302 *
303- * @param null| \ElggQuestion $question the question that needs answer
304- * @param null|\ElggUser $user the user askting the question (default: current user)
303+ * @param \ElggQuestion $question the question that needs answer
304+ * @param null|\ElggUser $user the user asking the question (default: current user)
305305 *
306306 * @return bool
307307 */
308- function questions_can_answer_question (\ElggQuestion $ question , \ElggUser $ user = null ): bool {
308+ function questions_can_answer_question (\ElggQuestion $ question , ? \ElggUser $ user = null ): bool {
309309 static $ general_experts_only ;
310310
311311 // default to current user
@@ -366,7 +366,7 @@ function questions_can_answer_question(\ElggQuestion $question, \ElggUser $user
366366 *
367367 * @return bool
368368 */
369- function questions_auto_mark_answer_correct (\ElggEntity $ container , \ElggUser $ user = null ) {
369+ function questions_auto_mark_answer_correct (\ElggEntity $ container , ? \ElggUser $ user = null ) {
370370 if (!$ container instanceof \ElggGroup) {
371371 // for now only supported in groups
372372 return false ;
0 commit comments