pro_translation = &$pro_translation; $this->cms_id_helper = &$cms_id_helper; } /** * Returns the sync object for a given job data-set. * * @param array $data * * @return WPML_TP_Remote_Job_Sync_Cancelled|WPML_TP_Remote_Job_Sync_Existing */ public function remote_job_sync( array $data ) { if ( $data['job_state'] !== 'cancelled' ) { return new WPML_TP_Remote_Job_Sync_Existing( $this->project, $this->cms_id_helper, $this->pro_translation, $data ); } else { return new WPML_TP_Remote_Job_Sync_Cancelled( $this->project, $this->cms_id_helper, $this->pro_translation, $data ); } } }