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.

Issues (217)

Security Analysis    no vulnerabilities found

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

classes/class-requirement.php (46 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace HM\BackUpWordPress;
4
5
/**
6
 * An abstract requirement class, individual requirements should
7
 * extend this class
8
 */
9
abstract class Requirement {
10
11
	/**
12
	 * @var string
13
	 */
14
	protected $name = '';
15
16
	/**
17
	 * @return mixed
18
	 */
19
	protected static function test() {}
20
21
	/**
22
	 * @return mixed
0 ignored issues
show
Consider making the return type a bit more specific; maybe use string.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
23
	 */
24
	public function name() {
25
		return $this->name;
26
	}
27
28
	/**
29
	 * @return mixed|string
0 ignored issues
show
Consider making the return type a bit more specific; maybe use string.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
30
	 */
31
	public function result() {
32
33
		$test = $this->test();
34
35
		if ( is_string( $test ) && $test ) {
36
			return $test;
37
		}
38
39
		if ( is_bool( $test ) || empty( $test ) ) {
40
41
			if ( $test ) {
42
				return 'Yes';
43
			}
44
45
			return 'No';
46
47
		}
48
49
		return var_export( $test, true );
50
51
	}
52
53
	public function raw_result() {
54
		return $this->test();
55
	}
56
}
57
58
/**
59
 * Class Requirement_Zip_Archive
60
 */
61
class Requirement_Zip_Archive extends Requirement {
62
63
	/**
64
	 * @var string
65
	 */
66
	var $name = 'ZipArchive';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
67
68
	/**
69
	 * @return bool
70
	 */
71
	public static function test() {
72
73
		if ( class_exists( 'ZipArchive' ) ) {
74
			return true;
75
		}
76
77
		return false;
78
79
	}
80
}
81
Requirements::register( 'HM\BackUpWordPress\Requirement_Zip_Archive', 'PHP' );
82
83
/**
84
 * Class Requirement_Zip_Command
85
 *
86
 * Tests whether the zip command is available and if it is what path it's available at
87
 */
88
class Requirement_Zip_Command_Path extends Requirement {
89
90
	/**
91
	 * @var string
92
	 */
93
	var $name = 'zip command';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
94
95
	/**
96
	 * @return string
0 ignored issues
show
Should the return type not be string|false?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
97
	 */
98
	public static function test() {
99
100
		$backup = new Zip_File_Backup_Engine;
101
102
		return $backup->get_zip_executable_path();
103
104
	}
105
}
106
Requirements::register( 'HM\BackUpWordPress\Requirement_Zip_Command_Path', 'Server' );
107
108
/**
109
 * Class Requirement_Mysqldump_Command
110
 *
111
 * Tests whether the zip command is available and if it is what path it's available at
112
 */
113
class Requirement_Mysqldump_Command_Path extends Requirement {
114
115
	/**
116
	 * @var string
117
	 */
118
	var $name = 'mysqldump command';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
119
120
	/**
121
	 * @return string
0 ignored issues
show
Should the return type not be string|false?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
122
	 */
123
	public static function test() {
124
125
		$backup = new Mysqldump_Database_Backup_Engine;
126
127
		return $backup->get_mysqldump_executable_path();
128
129
	}
130
}
131
Requirements::register( 'HM\BackUpWordPress\Requirement_Mysqldump_Command_Path', 'Server' );
132
133
/**
134
 * Class Requirement_PHP_Version
135
 */
136
class Requirement_PHP_Version extends Requirement {
137
138
	/**
139
	 * @var string
140
	 */
141
	var $name = 'Version';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
142
143
	/**
144
	 * @return string
145
	 */
146
	public static function test() {
147
		return PHP_VERSION;
148
	}
149
}
150
Requirements::register( 'HM\BackUpWordPress\Requirement_PHP_Version', 'PHP' );
151
152
/**
153
 * Class Requirement_Cron_Array
154
 */
155
class Requirement_Cron_Array extends Requirement {
156
157
	/**
158
	 * @var string
159
	 */
160
	var $name = 'Cron Array';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
161
162
	/**
163
	 * @return bool|mixed
164
	 */
165
	public static function test() {
166
167
		$cron = get_option( 'cron' );
168
169
		if ( ! $cron ) {
170
			return false;
171
		}
172
173
		return $cron;
174
175
	}
176
}
177
Requirements::register( 'HM\BackUpWordPress\Requirement_Cron_Array', 'Site' );
178
179
/**
180
 * Class Requirement_Cron_Array
181
 */
182
class Requirement_Language extends Requirement {
183
184
	/**
185
	 * @var string
186
	 */
187
	var $name = 'Language';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
188
189
	/**
190
	 * @return bool|mixed
191
	 */
192
	public static function test() {
193
194
		// Since 4.0
195
		$language = get_option( 'WPLANG' );
196
197
		if ( $language ) {
198
			return $language;
199
		}
200
201
		if ( defined( 'WPLANG' ) && WPLANG ) {
202
			return WPLANG;
203
		}
204
205
		return 'en_US';
206
207
	}
208
}
209
Requirements::register( 'HM\BackUpWordPress\Requirement_Language', 'Site' );
210
211
/**
212
 * Class Requirement_Safe_Mode
213
 */
214
class Requirement_Safe_Mode extends Requirement {
215
216
	/**
217
	 * @var string
218
	 */
219
	var $name = 'Safe Mode';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
220
221
	/**
222
	 * @return bool
223
	 */
224
	public static function test() {
225
		return Backup_Utilities::is_safe_mode_on();
226
	}
227
}
228
Requirements::register( 'HM\BackUpWordPress\Requirement_Safe_Mode', 'PHP' );
229
230
/**
231
 * Class Requirement_Memory_Limit
232
 */
233
class Requirement_PHP_Memory_Limit extends Requirement {
234
235
	/**
236
	 * @var string
237
	 */
238
	var $name = 'Memory Limit';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
239
240
	/**
241
	 * @return string
242
	 */
243
	public static function test() {
244
		return @ini_get( 'memory_limit' );
245
	}
246
}
247
Requirements::register( 'HM\BackUpWordPress\Requirement_PHP_Memory_Limit', 'PHP' );
248
249
/**
250
 * Class Requirement_Backup_Path
251
 */
252
class Requirement_Backup_Path extends Requirement {
253
254
	/**
255
	 * @var string
256
	 */
257
	var $name = 'Backup Path';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
258
259
	/**
260
	 * @return string
261
	 */
262
	public static function test() {
263
		return Path::get_path();
264
	}
265
}
266
Requirements::register( 'HM\BackUpWordPress\Requirement_Backup_Path', 'Site' );
267
268
/**
269
 * Class Requirement_Backup_Path_Permissions
270
 */
271
class Requirement_Backup_Path_Permissions extends Requirement {
272
273
	/**
274
	 * @var string
275
	 */
276
	var $name = 'Backup Path Permissions';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
277
278
	/**
279
	 * @return string
280
	 */
281
	public static function test() {
282
		return substr( sprintf( '%o', fileperms( Path::get_path() ) ), - 4 );
283
	}
284
}
285
Requirements::register( 'HM\BackUpWordPress\Requirement_Backup_Path_Permissions', 'Site' );
286
287
/**
288
 * Class Requirement_WP_CONTENT_DIR
289
 */
290
class Requirement_WP_CONTENT_DIR extends Requirement {
291
292
	/**
293
	 * @var string
294
	 */
295
	var $name = 'WP_CONTENT_DIR';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
296
297
	/**
298
	 * @return string
299
	 */
300
	public static function test() {
301
		return WP_CONTENT_DIR;
302
	}
303
}
304
Requirements::register( 'HM\BackUpWordPress\Requirement_WP_CONTENT_DIR', 'Site' );
305
306
/**
307
 * Class Requirement_WP_CONTENT_DIR_Permissions
308
 */
309
class Requirement_WP_CONTENT_DIR_Permissions extends Requirement {
310
311
	/**
312
	 * @var string
313
	 */
314
	var $name = 'WP_CONTENT_DIR Permissions';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
315
316
	/**
317
	 * @return string
318
	 */
319
	public static function test() {
320
		return substr( sprintf( '%o', fileperms( WP_CONTENT_DIR ) ), - 4 );
321
	}
322
}
323
Requirements::register( 'HM\BackUpWordPress\Requirement_WP_CONTENT_DIR_Permissions', 'Site' );
324
325
/**
326
 * Class Requirement_ABSPATH
327
 */
328
class Requirement_ABSPATH extends Requirement {
329
330
	/**
331
	 * @var string
332
	 */
333
	var $name = 'ABSPATH';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
334
335
	/**
336
	 * @return string
337
	 */
338
	public static function test() {
339
		return ABSPATH;
340
	}
341
}
342
Requirements::register( 'HM\BackUpWordPress\Requirement_ABSPATH', 'Site' );
343
344
/**
345
 * Class Requirement_Backup_Root_Path
346
 */
347
class Requirement_Backup_Root_Path extends Requirement {
348
349
	/**
350
	 * @var string
351
	 */
352
	var $name = 'Site Root Path';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
353
354
	/**
355
	 * @return string
356
	 */
357
	public static function test() {
358
		return Path::get_root();
359
	}
360
}
361
Requirements::register( 'HM\BackUpWordPress\Requirement_Backup_Root_Path', 'Site' );
362
363
/**
364
 * Class Requirement_Calculated_Size
365
 */
366
class Requirement_Calculated_Size extends Requirement {
367
368
	/**
369
	 * @var string
370
	 */
371
	var $name = 'Calculated size of site';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
372
373
	/**
374
	 * @return array
375
	 */
376
	public static function test() {
377
378
		$backup_sizes = array();
379
380
		$schedules = Schedules::get_instance();
381
382
		foreach ( $schedules->get_schedules() as $schedule ) {
383
384
			$site_size = new Site_Size( $schedule->get_type(), $schedule->get_excludes() );
385
386
			if ( $site_size->is_site_size_cached() ) {
387
				$backup_sizes[ $schedule->get_type() ] = $site_size->get_formatted_site_size();
388
			}
389
		}
390
391
		return $backup_sizes;
392
393
	}
394
}
395
Requirements::register( 'HM\BackUpWordPress\Requirement_Calculated_Size', 'Site' );
396
397
/**
398
 * Class Requirement_WP_Cron_Test_Response
399
 */
400
class Requirement_WP_Cron_Test extends Requirement {
401
402
	/**
403
	 * @var string
404
	 */
405
	var $name = 'WP Cron Test Failed';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
406
407
	/**
408
	 * @return mixed
0 ignored issues
show
Consider making the return type a bit more specific; maybe use boolean.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
409
	 */
410
	public static function test() {
411
		return (bool) get_option( 'hmbkp_wp_cron_test_failed' );
412
	}
413
}
414
Requirements::register( 'HM\BackUpWordPress\Requirement_WP_Cron_Test', 'Site' );
415
416
/**
417
 * Class Requirement_PHP_API
418
 */
419
class Requirement_PHP_API extends Requirement {
420
421
	/**
422
	 * @var string
423
	 */
424
	var $name = 'Interface';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
425
426
	/**
427
	 * @return string
428
	 */
429
	public static function test() {
430
		return php_sapi_name();
431
	}
432
}
433
Requirements::register( 'HM\BackUpWordPress\Requirement_PHP_API', 'PHP' );
434
435
/**
436
 * Class Requirement_Server_Software
437
 */
438
class Requirement_Server_Software extends Requirement {
439
440
	/**
441
	 * @var string
442
	 */
443
	var $name = 'Server';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
444
445
	/**
446
	 * @return bool
447
	 */
448
	public static function test() {
449
450
		if ( ! empty( $_SERVER['SERVER_SOFTWARE'] ) ) {
451
			return $_SERVER['SERVER_SOFTWARE'];
452
		}
453
454
		return false;
455
456
	}
457
}
458
Requirements::register( 'HM\BackUpWordPress\Requirement_Server_Software', 'Server' );
459
460
/**
461
 * Class Requirement_Server_OS
462
 */
463
class Requirement_Server_OS extends Requirement {
464
465
	/**
466
	 * @var string
467
	 */
468
	var $name = 'OS';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
469
470
	/**
471
	 * @return string
472
	 */
473
	public static function test() {
474
		return PHP_OS;
475
	}
476
}
477
Requirements::register( 'HM\BackUpWordPress\Requirement_Server_OS', 'Server' );
478
479
/**
480
 * Class Requirement_PHP_Disable_Functions
481
 */
482
class Requirement_PHP_Disable_Functions extends Requirement {
483
484
	/**
485
	 * @var string
486
	 */
487
	var $name = 'Disabled Functions';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
488
489
	/**
490
	 * @return string
491
	 */
492
	public static function test() {
493
		return @ini_get( 'disable_functions' );
494
	}
495
}
496
Requirements::register( 'HM\BackUpWordPress\Requirement_PHP_Disable_Functions', 'PHP' );
497
498
/**
499
 * Class Requirement_PHP_Open_Basedir
500
 */
501
class Requirement_PHP_Open_Basedir extends Requirement {
502
503
	/**
504
	 * @var string
505
	 */
506
	var $name = 'open_basedir';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
507
508
	/**
509
	 * @return string
510
	 */
511
	public static function test() {
512
		return @ini_get( 'open_basedir' );
513
	}
514
}
515
Requirements::register( 'HM\BackUpWordPress\Requirement_PHP_Open_Basedir', 'PHP' );
516
517
/* CONSTANTS */
518
519
/**
520
 * Class Requirement_Define_HMBKP_PATH
521
 */
522
class Requirement_Define_HMBKP_PATH extends Requirement {
523
524
	/**
525
	 * @var string
526
	 */
527
	var $name = 'HMBKP_PATH';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
528
529
	/**
530
	 * @return string
531
	 */
532
	public static function test() {
533
		return defined( 'HMBKP_PATH' ) ? HMBKP_PATH : '';
534
	}
535
}
536
Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_PATH', 'constants' );
537
538
/**
539
 * Class Requirement_Define_HMBKP_ROOT
540
 */
541
class Requirement_Define_HMBKP_ROOT extends Requirement {
542
543
	/**
544
	 * @var string
545
	 */
546
	var $name = 'HMBKP_ROOT';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
547
548
	/**
549
	 * @return string
550
	 */
551
	public static function test() {
552
		return defined( 'HMBKP_ROOT' ) ? HMBKP_ROOT : '';
553
	}
554
}
555
Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_ROOT', 'constants' );
556
557
/**
558
 * Class Requirement_Define_HMBKP_MYSQLDUMP_PATH
559
 */
560
class Requirement_Define_HMBKP_MYSQLDUMP_PATH extends Requirement {
561
562
	/**
563
	 * @var string
564
	 */
565
	var $name = 'HMBKP_MYSQLDUMP_PATH';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
566
567
	/**
568
	 * @return string
569
	 */
570
	public static function test() {
571
		return defined( 'HMBKP_MYSQLDUMP_PATH' ) ? HMBKP_MYSQLDUMP_PATH : '';
572
	}
573
}
574
Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_MYSQLDUMP_PATH', 'constants' );
575
576
/**
577
 * Class Requirement_Define_HMBKP_ZIP_PATH
578
 */
579
class Requirement_Define_HMBKP_ZIP_PATH extends Requirement {
580
581
	/**
582
	 * @var string
583
	 */
584
	var $name = 'HMBKP_ZIP_PATH';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
585
586
	/**
587
	 * @return string
588
	 */
589
	public static function test() {
590
		return defined( 'HMBKP_ZIP_PATH' ) ? HMBKP_ZIP_PATH : '';
591
	}
592
}
593
Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_ZIP_PATH', 'constants' );
594
595
/**
596
 * Class Requirement_Define_HMBKP_CAPABILITY
597
 */
598
class Requirement_Define_HMBKP_CAPABILITY extends Requirement {
599
600
	/**
601
	 * @var string
602
	 */
603
	var $name = 'HMBKP_CAPABILITY';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
604
605
	/**
606
	 * @return string
607
	 */
608
	public static function test() {
609
		return defined( 'HMBKP_CAPABILITY' ) ? HMBKP_CAPABILITY : '';
610
	}
611
}
612
Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_CAPABILITY', 'constants' );
613
614
/**
615
 * Class Requirement_Define_HMBKP_EMAIL
616
 */
617
class Requirement_Define_HMBKP_EMAIL extends Requirement {
618
619
	/**
620
	 * @var string
621
	 */
622
	var $name = 'HMBKP_EMAIL';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
623
624
	/**
625
	 * @return string
626
	 */
627
	public static function test() {
628
		return defined( 'HMBKP_EMAIL' ) ? HMBKP_EMAIL : '';
629
	}
630
}
631
Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_EMAIL', 'constants' );
632
633
/**
634
 * Class Requirement_Define_HMBKP_ATTACHMENT_MAX_FILESIZE
635
 */
636
class Requirement_Define_HMBKP_ATTACHMENT_MAX_FILESIZE extends Requirement {
637
638
	/**
639
	 * @var string
640
	 */
641
	var $name = 'HMBKP_ATTACHMENT_MAX_FILESIZE';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
642
643
	/**
644
	 * @return string
645
	 */
646
	public static function test() {
647
		return defined( 'HMBKP_ATTACHMENT_MAX_FILESIZE' ) ? HMBKP_ATTACHMENT_MAX_FILESIZE : '';
648
	}
649
}
650
Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_ATTACHMENT_MAX_FILESIZE', 'constants' );
651
652
/**
653
 * Class Requirement_Define_HMBKP_EXCLUDE
654
 */
655
class Requirement_Define_HMBKP_EXCLUDE extends Requirement {
656
657
	/**
658
	 * @var string
659
	 */
660
	var $name = 'HMBKP_EXCLUDE';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
661
662
	/**
663
	 * @return string
664
	 */
665
	public static function test() {
666
		return defined( 'HMBKP_EXCLUDE' ) ? HMBKP_EXCLUDE : '';
667
	}
668
}
669
Requirements::register( 'HM\BackUpWordPress\Requirement_Define_HMBKP_EXCLUDE', 'constants' );
670
671
class Requirement_Active_Plugins extends Requirement {
672
673
	var $name = 'Active Plugins';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
674
675
	public static function test() {
0 ignored issues
show
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
676
		return get_option( 'active_plugins' );
677
	}
678
}
679
Requirements::register( 'HM\BackUpWordPress\Requirement_Active_Plugins', 'Site' );
680
681
class Requirement_Home_Url extends Requirement {
682
683
	var $name = 'Home URL';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
684
685
	public static function test() {
0 ignored issues
show
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
686
		return home_url();
687
	}
688
}
689
Requirements::register( 'HM\BackUpWordPress\Requirement_Home_Url', 'Site' );
690
691
class Requirement_Site_Url extends Requirement {
692
693
	var $name = 'Site URL';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
694
695
	public static function test() {
0 ignored issues
show
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
696
		return site_url();
697
	}
698
}
699
Requirements::register( 'HM\BackUpWordPress\Requirement_Site_Url', 'Site' );
700
701
class Requirement_Plugin_Version extends Requirement {
702
	var $name = 'Plugin Version';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
703
704
	public static function test() {
0 ignored issues
show
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
705
		return Plugin::PLUGIN_VERSION;
706
	}
707
}
708
Requirements::register( 'HM\BackUpWordPress\Requirement_Plugin_Version', 'constants' );
709
710
class Requirement_Max_Exec extends Requirement {
711
712
	var $name = 'Max execution time';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
713
714
	public static function test() {
0 ignored issues
show
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
715
		return @ini_get( 'max_execution_time' );
716
	}
717
}
718
Requirements::register( 'HM\BackUpWordPress\Requirement_Max_Exec', 'PHP' );
719
720
class Requirement_PDO extends Requirement {
721
722
	var $name = 'PDO';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
723
724
	public static function test() {
725
726
		if ( class_exists( 'PDO' ) && \PDO::getAvailableDrivers() ) {
727
			return implode( ', ', \PDO::getAvailableDrivers() );
728
		}
729
730
		return false;
731
732
	}
733
}
734
735
Requirements::register( 'HM\BackUpWordPress\Requirement_PDO', 'PHP' );
736
737
/**
738
 * Class Requirement_Proc_Open
739
 */
740
class Requirement_Proc_Open extends Requirement {
741
742
	/**
743
	 * @var string
744
	 */
745
	var $name = 'proc_open';
0 ignored issues
show
The visibility should be declared for property $name.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
746
747
	/**
748
	 * @return bool
749
	 */
750
	public static function test() {
751
		return function_exists( 'proc_open' ) && function_exists( 'proc_close' );
752
	}
753
}
754
Requirements::register( 'HM\BackUpWordPress\Requirement_Proc_Open', 'PHP' );
755