@@ -469,6 +469,11 @@ |
||
| 469 | 469 | * handler $fd - file handler where to write the records |
| 470 | 470 | * @return |
| 471 | 471 | */ |
| 472 | + |
|
| 473 | + /** |
|
| 474 | + * @param integer $start |
|
| 475 | + * @param integer $limit |
|
| 476 | + */ |
|
| 472 | 477 | public function export_table($databaseName, $tableName, $start, $limit, $dumpfile) |
| 473 | 478 | { |
| 474 | 479 | $this->logger->debug(sprintf(("Exporting table %s.%s data"), $databaseName, $tableName)); |
@@ -580,6 +580,9 @@ discard block |
||
| 580 | 580 | |
| 581 | 581 | } |
| 582 | 582 | |
| 583 | + /** |
|
| 584 | + * @param mysqli $mysqli |
|
| 585 | + */ |
|
| 583 | 586 | private function update_wp_url($wp_path, $url, $mysqli) |
| 584 | 587 | { |
| 585 | 588 | $wp_config = $wp_path.DS."wp-config.php"; |
@@ -886,6 +889,9 @@ discard block |
||
| 886 | 889 | $this->send_response(200, $return); |
| 887 | 890 | } |
| 888 | 891 | |
| 892 | + /** |
|
| 893 | + * @param string $val |
|
| 894 | + */ |
|
| 889 | 895 | private function return_bytes($val) { |
| 890 | 896 | $val = trim($val); |
| 891 | 897 | $last = strtolower($val[strlen($val)-1]); |
@@ -943,6 +949,9 @@ discard block |
||
| 943 | 949 | return $files; |
| 944 | 950 | } |
| 945 | 951 | |
| 952 | + /** |
|
| 953 | + * @param string $field |
|
| 954 | + */ |
|
| 946 | 955 | private function sort_by( &$array, $field, $direction = 'asc') |
| 947 | 956 | { |
| 948 | 957 | $direction = strtolower($direction); |
@@ -988,6 +997,9 @@ discard block |
||
| 988 | 997 | * Serialize fix methods below for mysql query lines |
| 989 | 998 | */ |
| 990 | 999 | |
| 1000 | + /** |
|
| 1001 | + * @return string |
|
| 1002 | + */ |
|
| 991 | 1003 | function do_serialized_fix($query) |
| 992 | 1004 | { |
| 993 | 1005 | $query = str_replace(array("\\n","\\r","\\'"), array("","","\""), ($query)); |
@@ -47,8 +47,6 @@ |
||
| 47 | 47 | * |
| 48 | 48 | * @since 1.0.0 |
| 49 | 49 | * |
| 50 | - * @param string $plugin_name The name of this plugin. |
|
| 51 | - * @param string $version The version of this plugin. |
|
| 52 | 50 | */ |
| 53 | 51 | public function __construct( Xcloner $xcloner_container ) { |
| 54 | 52 | |
@@ -213,6 +213,10 @@ discard block |
||
| 213 | 213 | * |
| 214 | 214 | * @return bool |
| 215 | 215 | */ |
| 216 | + |
|
| 217 | + /** |
|
| 218 | + * @param string $error_message |
|
| 219 | + */ |
|
| 216 | 220 | public function send_notification_error($to, $from, $subject, $backup_name, $params, $error_message) |
| 217 | 221 | { |
| 218 | 222 | |
@@ -251,6 +255,11 @@ discard block |
||
| 251 | 255 | * |
| 252 | 256 | * @return bool |
| 253 | 257 | */ |
| 258 | + |
|
| 259 | + /** |
|
| 260 | + * @param string $from |
|
| 261 | + * @param string $subject |
|
| 262 | + */ |
|
| 254 | 263 | public function send_notification( |
| 255 | 264 | $to, |
| 256 | 265 | $from, |
@@ -339,6 +348,10 @@ discard block |
||
| 339 | 348 | * Incremental Backup method |
| 340 | 349 | * |
| 341 | 350 | */ |
| 351 | + |
|
| 352 | + /** |
|
| 353 | + * @param integer $init |
|
| 354 | + */ |
|
| 342 | 355 | public function start_incremental_backup($backup_params, $extra_params, $init) |
| 343 | 356 | { |
| 344 | 357 | $return = array(); |
@@ -576,6 +589,10 @@ discard block |
||
| 576 | 589 | * Write multipart file components |
| 577 | 590 | * |
| 578 | 591 | */ |
| 592 | + |
|
| 593 | + /** |
|
| 594 | + * @param string $path |
|
| 595 | + */ |
|
| 579 | 596 | private function write_multipart_file($path) |
| 580 | 597 | { |
| 581 | 598 | $path = $this->get_archive_name_with_extension(); |
@@ -636,6 +653,10 @@ discard block |
||
| 636 | 653 | * Add file to archive |
| 637 | 654 | * |
| 638 | 655 | */ |
| 656 | + |
|
| 657 | + /** |
|
| 658 | + * @param integer $append |
|
| 659 | + */ |
|
| 639 | 660 | public function add_file_to_archive($file_info, $start_at_byte, $byte_limit = 0, $append, $filesystem) |
| 640 | 661 | { |
| 641 | 662 | |
@@ -207,6 +207,9 @@ discard block |
||
| 207 | 207 | return $this->start_filesystem->normalizeFileInfo($info); |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | + /** |
|
| 211 | + * @param string $file |
|
| 212 | + */ |
|
| 210 | 213 | public function get_storage_path_file_info($file) |
| 211 | 214 | { |
| 212 | 215 | return $this->getMetadataFull('storage_adapter', $file); |
@@ -284,6 +287,9 @@ discard block |
||
| 284 | 287 | return $total; |
| 285 | 288 | } |
| 286 | 289 | |
| 290 | + /** |
|
| 291 | + * @param string $backup_name |
|
| 292 | + */ |
|
| 287 | 293 | public function is_part($backup_name) |
| 288 | 294 | { |
| 289 | 295 | if (stristr($backup_name, "-part")) { |
@@ -741,6 +747,9 @@ discard block |
||
| 741 | 747 | |
| 742 | 748 | } |
| 743 | 749 | |
| 750 | + /** |
|
| 751 | + * @param string $tmp_file |
|
| 752 | + */ |
|
| 744 | 753 | public function estimate_reading_time($tmp_file) |
| 745 | 754 | { |
| 746 | 755 | $this->logger->debug(sprintf(("Estimating file system reading time"))); |
@@ -781,6 +790,9 @@ discard block |
||
| 781 | 790 | return $name; |
| 782 | 791 | } |
| 783 | 792 | |
| 793 | + /** |
|
| 794 | + * @param string $field |
|
| 795 | + */ |
|
| 784 | 796 | public function sort_by(&$array, $field, $direction = 'asc') |
| 785 | 797 | { |
| 786 | 798 | if (strtolower($direction) == "desc" || $direction == SORT_DESC) { |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | - * @return mixed |
|
| 55 | + * @return string |
|
| 56 | 56 | */ |
| 57 | 57 | public function get_target() |
| 58 | 58 | { |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | /** |
| 144 | - * @param $filename |
|
| 144 | + * @param string $filename |
|
| 145 | 145 | * @param string $mimetype |
| 146 | 146 | * @param string $postname |
| 147 | 147 | * |
@@ -281,6 +281,9 @@ |
||
| 281 | 281 | } |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | + /** |
|
| 285 | + * @param string $storage_type |
|
| 286 | + */ |
|
| 284 | 287 | public function verify_filesystem( $storage_type ) { |
| 285 | 288 | $method = "get_" . $storage_type . "_filesystem"; |
| 286 | 289 | |
@@ -327,6 +327,9 @@ |
||
| 327 | 327 | $this->xcloner_file_system->cleanup_tmp_directories(); |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | + /** |
|
| 331 | + * @param integer $id |
|
| 332 | + */ |
|
| 330 | 333 | public function xcloner_scheduler_callback( $id, $schedule = "" ) { |
| 331 | 334 | if ( $id ) { |
| 332 | 335 | $schedule = $this->get_schedule_by_id( $id ); |
@@ -183,6 +183,9 @@ |
||
| 183 | 183 | return $wpdb->prefix; |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | + /** |
|
| 187 | + * @param string $option |
|
| 188 | + */ |
|
| 186 | 189 | public function get_xcloner_option( $option ) { |
| 187 | 190 | $data = get_option( $option ); |
| 188 | 191 | |