GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Xcloner_Deactivator   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 9
c 2
b 0
f 0
dl 0
loc 22
rs 10
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A deactivate() 0 13 3
1
<?php
2
/**
3
 * XCloner - Backup and Restore backup plugin for Wordpress
4
 *
5
 * class-xcloner-deactivator.php
6
 * @author Liuta Ovidiu <[email protected]>
7
 *
8
 *        This program is free software; you can redistribute it and/or modify
9
 *        it under the terms of the GNU General Public License as published by
10
 *        the Free Software Foundation; either version 2 of the License, or
11
 *        (at your option) any later version.
12
 *
13
 *        This program is distributed in the hope that it will be useful,
14
 *        but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 *        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 *        GNU General Public License for more details.
17
 *
18
 *        You should have received a copy of the GNU General Public License
19
 *        along with this program; if not, write to the Free Software
20
 *        Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
 *        MA 02110-1301, USA.
22
 *
23
 * @link https://github.com/ovidiul/XCloner-Wordpress
24
 *
25
 * @modified 7/31/18 3:28 PM
26
 *
27
 */
28
29
/**
30
 * Fired during plugin deactivation.
31
 *
32
 * This class defines all code necessary to run during the plugin's deactivation.
33
 *
34
 * @since      1.0.0
35
 * @package    Xcloner
36
 * @subpackage Xcloner/includes
37
 * @author     Liuta Ovidiu <[email protected]>
38
 * @link       http://www.thinkovi.com
39
 */
40
41
class Xcloner_Deactivator {
42
43
	/**
44
	 * Short Description. (use period)
45
	 *
46
	 * Long Description.
47
	 *
48
	 * @since    1.0.0
49
	 */
50
	public static function deactivate() {
51
52
		global $xcloner_plugin;
53
54
		if (is_a($xcloner_plugin, 'Xcloner')) {
55
			try {
56
				$xcloner_plugin->get_xcloner_filesystem()->cleanup_tmp_directories();
57
			}catch (Exception $e) {
58
				$xcloner_plugin->trigger_message_notice($e->getMessage());
59
			}
60
61
			$xcloner_scheduler = $xcloner_plugin->get_xcloner_scheduler();
62
			$xcloner_scheduler->deactivate_wp_cron_hooks();
63
		}
64
	}
65
66
}
67