Completed
Push — master ( caf222...deba87 )
by Jeroen
72:32 queued 44:47
created

views/default/widgets/banned_users/content.php (2 issues)

1
<?php
2
/**
3
 * Banned users admin widget
4
 */
5
$widget = elgg_extract('entity', $vars);
6
7
$num_display = sanitize_int($widget->num_display, false);
0 ignored issues
show
Deprecated Code introduced by
The function sanitize_int() has been deprecated: Use query parameters where possible ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

7
$num_display = /** @scrutinizer ignore-deprecated */ sanitize_int($widget->num_display, false);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
8
// set default value for display number
9
if (!$num_display) {
10
	$num_display = 5;
11
}
12
13
echo elgg_list_entities_from_metadata([
0 ignored issues
show
Are you sure elgg_list_entities_from_...imit' => $num_display)) of type array can be used in echo? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

13
echo /** @scrutinizer ignore-type */ elgg_list_entities_from_metadata([
Loading history...
14
	'type' => 'user',
15
	'subtype'=> null,
16
	'metadata_name_value_pairs' => [
17
		['banned' => 'yes'],
18
	],
19
	'pagination' => false,
20
	'limit' => $num_display,
21
]);
22