@@ -49,6 +49,9 @@ |
||
| 49 | 49 | |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | + /** |
|
| 53 | + * @param string $filename |
|
| 54 | + */ |
|
| 52 | 55 | public function set_backup_filename( $filename ) { |
| 53 | 56 | $this->backup_filename = $filename; |
| 54 | 57 | } |
@@ -37,6 +37,9 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | |
| 40 | + /** |
|
| 41 | + * @return string |
|
| 42 | + */ |
|
| 40 | 43 | public function get_name() { |
| 41 | 44 | |
| 42 | 45 | global $wpdb; |
@@ -44,6 +47,9 @@ discard block |
||
| 44 | 47 | |
| 45 | 48 | } |
| 46 | 49 | |
| 50 | + /** |
|
| 51 | + * @return string |
|
| 52 | + */ |
|
| 47 | 53 | public function get_user() { |
| 48 | 54 | |
| 49 | 55 | global $wpdb; |
@@ -51,6 +57,9 @@ discard block |
||
| 51 | 57 | |
| 52 | 58 | } |
| 53 | 59 | |
| 60 | + /** |
|
| 61 | + * @return string |
|
| 62 | + */ |
|
| 54 | 63 | public function get_password() { |
| 55 | 64 | |
| 56 | 65 | global $wpdb; |
@@ -106,6 +106,9 @@ |
||
| 106 | 106 | |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | + /** |
|
| 110 | + * @return string |
|
| 111 | + */ |
|
| 109 | 112 | public function get_zip_executable_path() { |
| 110 | 113 | |
| 111 | 114 | if ( defined( 'HMBKP_ZIP_PATH' ) ) { |
@@ -59,6 +59,9 @@ |
||
| 59 | 59 | |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | + /** |
|
| 63 | + * @param string $context |
|
| 64 | + */ |
|
| 62 | 65 | public function error( $context, $error ) { |
| 63 | 66 | |
| 64 | 67 | if ( empty( $context ) || empty( $error ) ) { |
@@ -45,6 +45,9 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | + /** |
|
| 49 | + * @param string $function |
|
| 50 | + */ |
|
| 48 | 51 | public static function is_function_disabled( $function, $ini_get_callback = 'ini_get' ) { |
| 49 | 52 | |
| 50 | 53 | $suhosin_blacklist = array_map( 'trim', explode( ',', @call_user_func( $ini_get_callback, 'suhosin.executor.func.blacklist' ) ) ); |
@@ -60,6 +63,9 @@ discard block |
||
| 60 | 63 | |
| 61 | 64 | } |
| 62 | 65 | |
| 66 | + /** |
|
| 67 | + * @param string[] $paths |
|
| 68 | + */ |
|
| 63 | 69 | public static function get_executable_path( $paths ) { |
| 64 | 70 | |
| 65 | 71 | if ( ! self::is_exec_available() ) { |
@@ -72,6 +72,9 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | + /** |
|
| 76 | + * @param string $type |
|
| 77 | + */ |
|
| 75 | 78 | public function set_type( $type ) { |
| 76 | 79 | $this->type = $type; |
| 77 | 80 | } |
@@ -80,10 +83,16 @@ discard block |
||
| 80 | 83 | $this->excludes = $excludes; |
| 81 | 84 | } |
| 82 | 85 | |
| 86 | + /** |
|
| 87 | + * @param string $filename |
|
| 88 | + */ |
|
| 83 | 89 | public function set_database_dump_filename( $filename ) { |
| 84 | 90 | $this->database_dump_filename = $filename; |
| 85 | 91 | } |
| 86 | 92 | |
| 93 | + /** |
|
| 94 | + * @param string $filename |
|
| 95 | + */ |
|
| 87 | 96 | public function set_backup_filename( $filename ) { |
| 88 | 97 | $this->backup_filename = $filename; |
| 89 | 98 | } |
@@ -221,6 +221,9 @@ discard block |
||
| 221 | 221 | |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | + /** |
|
| 225 | + * @param string $ini_setting |
|
| 226 | + */ |
|
| 224 | 227 | protected static function is_function_disabled( $ini_setting ) { |
| 225 | 228 | |
| 226 | 229 | if ( array_intersect( array( |
@@ -442,7 +445,7 @@ discard block |
||
| 442 | 445 | * |
| 443 | 446 | * @param string $existing_archive_filepath |
| 444 | 447 | * |
| 445 | - * @return null |
|
| 448 | + * @return \WP_Error|null |
|
| 446 | 449 | */ |
| 447 | 450 | public function set_existing_archive_filepath( $existing_archive_filepath ) { |
| 448 | 451 | |
@@ -1370,6 +1373,7 @@ discard block |
||
| 1370 | 1373 | /** |
| 1371 | 1374 | * Get the errors |
| 1372 | 1375 | * |
| 1376 | + * @param string $context |
|
| 1373 | 1377 | */ |
| 1374 | 1378 | public function get_errors( $context = null ) { |
| 1375 | 1379 | |
@@ -1385,7 +1389,7 @@ discard block |
||
| 1385 | 1389 | * Add an error to the errors stack |
| 1386 | 1390 | * |
| 1387 | 1391 | * @param string $context |
| 1388 | - * @param mixed $error |
|
| 1392 | + * @param string $error |
|
| 1389 | 1393 | */ |
| 1390 | 1394 | public function error( $context, $error ) { |
| 1391 | 1395 | |
@@ -1402,7 +1406,7 @@ discard block |
||
| 1402 | 1406 | /** |
| 1403 | 1407 | * Migrate errors to warnings |
| 1404 | 1408 | * |
| 1405 | - * @param null $context |
|
| 1409 | + * @param string $context |
|
| 1406 | 1410 | */ |
| 1407 | 1411 | private function errors_to_warnings( $context = null ) { |
| 1408 | 1412 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | /** |
| 138 | 138 | * Set the path directly, overriding the default |
| 139 | 139 | * |
| 140 | - * @param $path |
|
| 140 | + * @param boolean $path |
|
| 141 | 141 | */ |
| 142 | 142 | public function set_path( $path ) { |
| 143 | 143 | |
@@ -363,7 +363,6 @@ discard block |
||
| 363 | 363 | * Move backup files from an existing directory and the new |
| 364 | 364 | * location |
| 365 | 365 | * |
| 366 | - * @param string $path The path to move the backups from |
|
| 367 | 366 | */ |
| 368 | 367 | public function move_old_backups( $from ) { |
| 369 | 368 | |
@@ -19,14 +19,14 @@ discard block |
||
| 19 | 19 | abstract protected function test(); |
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | - * @return mixed |
|
| 22 | + * @return string |
|
| 23 | 23 | */ |
| 24 | 24 | public function name() { |
| 25 | 25 | return $this->name; |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | - * @return mixed|string |
|
| 29 | + * @return string |
|
| 30 | 30 | */ |
| 31 | 31 | public function result() { |
| 32 | 32 | |
@@ -524,7 +524,7 @@ discard block |
||
| 524 | 524 | var $name = 'WP Cron Test Failed'; |
| 525 | 525 | |
| 526 | 526 | /** |
| 527 | - * @return mixed |
|
| 527 | + * @return boolean |
|
| 528 | 528 | */ |
| 529 | 529 | protected function test() { |
| 530 | 530 | return (bool) get_option( 'hmbkp_wp_cron_test_failed' ); |