Bulk_Delete_Users::delete_users_by_role()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
use BulkWP\BulkDelete\Core\Users\Modules\DeleteUsersByUserRoleModule;
3
4
defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
5
6
/**
7
 * Deprecated Class.
8
 *
9
 * It is still here for compatibility reasons and will be removed eventually.
10
 *
11
 * Currently used by Bulk Delete Scheduler for Deleting Users by Role add-on - v0.6
12
 *
13
 * @author     Sudar
14
 *
15
 * @package    BulkDelete\Deprecated
16
 */
17
class Bulk_Delete_Users {
18
	/**
19
	 * Wire up proper class for backward compatibility.
20
	 *
21
	 * @since 5.5
22
	 *
23
	 * @param array $delete_options Delete options.
24
	 *
25
	 * @return int
26
	 */
27
	public static function delete_users_by_role( $delete_options ) {
28
		$module = new DeleteUsersByUserRoleModule();
29
30
		return $module->delete( $delete_options );
31
	}
32
}
33