@@ -52,6 +52,9 @@ discard block |
||
52 | 52 | return (double) get_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, 0 ); |
53 | 53 | } |
54 | 54 | |
55 | + /** |
|
56 | + * @param integer $time |
|
57 | + */ |
|
55 | 58 | public function set_next_sync_time( $time, $queue_name ) { |
56 | 59 | return update_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, $time, true ); |
57 | 60 | } |
@@ -64,6 +67,9 @@ discard block |
||
64 | 67 | return $this->do_sync_and_set_delays( $this->sync_queue ); |
65 | 68 | } |
66 | 69 | |
70 | + /** |
|
71 | + * @param Jetpack_Sync_Queue $queue |
|
72 | + */ |
|
67 | 73 | public function do_sync_and_set_delays( $queue ) { |
68 | 74 | // don't sync if importing |
69 | 75 | if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { |
@@ -293,6 +299,10 @@ discard block |
||
293 | 299 | } |
294 | 300 | |
295 | 301 | // in seconds |
302 | + |
|
303 | + /** |
|
304 | + * @param double $seconds |
|
305 | + */ |
|
296 | 306 | function set_max_dequeue_time( $seconds ) { |
297 | 307 | $this->max_dequeue_time = $seconds; |
298 | 308 | } |
@@ -321,6 +321,9 @@ |
||
321 | 321 | return self::DEFAULT_SYNC_CRON_INTERVAL; |
322 | 322 | } |
323 | 323 | |
324 | + /** |
|
325 | + * @param string $hook |
|
326 | + */ |
|
324 | 327 | static function maybe_schedule_sync_cron( $schedule, $hook ) { |
325 | 328 | if ( ! $hook ) { |
326 | 329 | return; |
@@ -107,6 +107,9 @@ discard block |
||
107 | 107 | self::set_is_sending( null ); |
108 | 108 | } |
109 | 109 | |
110 | + /** |
|
111 | + * @param boolean|null $is_importing |
|
112 | + */ |
|
110 | 113 | static function set_importing( $is_importing ) { |
111 | 114 | // set to NULL to revert to WP_IMPORTING, the standard behaviour |
112 | 115 | self::$is_importing = $is_importing; |
@@ -137,6 +140,9 @@ discard block |
||
137 | 140 | return (bool) self::$is_syncing; |
138 | 141 | } |
139 | 142 | |
143 | + /** |
|
144 | + * @param boolean|null $is_syncing |
|
145 | + */ |
|
140 | 146 | static function set_is_syncing( $is_syncing ) { |
141 | 147 | self::$is_syncing = $is_syncing; |
142 | 148 | } |
@@ -145,6 +151,9 @@ discard block |
||
145 | 151 | return (bool) self::$is_sending; |
146 | 152 | } |
147 | 153 | |
154 | + /** |
|
155 | + * @param boolean|null $is_sending |
|
156 | + */ |
|
148 | 157 | static function set_is_sending( $is_sending ) { |
149 | 158 | self::$is_sending = $is_sending; |
150 | 159 | } |
@@ -1,5 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | class WPCOM_JSON_API_Update_Media_v1_2_Endpoint extends WPCOM_JSON_API_Update_Media_v1_1_Endpoint { |
3 | + |
|
4 | + /** |
|
5 | + * @param integer $media_id |
|
6 | + */ |
|
3 | 7 | private function update_by_attrs_parameter( $media_id, $attrs ) { |
4 | 8 | $insert = array(); |
5 | 9 | |
@@ -72,7 +76,7 @@ discard block |
||
72 | 76 | /** |
73 | 77 | * Store a new `snapshot` into the `revision_history` post metadata. |
74 | 78 | * |
75 | - * @param {Number} $media_id - media post ID |
|
79 | + * @param integer $media_id - media post ID |
|
76 | 80 | * @return {Boolean} `true` if the update action was successful. |
77 | 81 | */ |
78 | 82 | private function store_snapshot( $media_id, $filename ) { |
@@ -148,7 +152,7 @@ discard block |
||
148 | 152 | * Get the image from a remote url and then save it locally. |
149 | 153 | * |
150 | 154 | * @param {String} $url - image URL to save locally |
151 | - * @param {Number} $media_id - media post ID |
|
155 | + * @param integer $media_id - media post ID |
|
152 | 156 | * @return {Array|WP_Error} An array with information about the new file saved or a WP_Error is something went wrong. |
153 | 157 | */ |
154 | 158 | private function save_media_from_url( $url, $media_id ) { |