after values that were written. Used both to confirm * the write to the merchant and to drive the dashboard refresh. */ class ARWC_Fix_Result { /** * Whether any value was actually changed. * * @var bool */ protected $changed = false; /** * Per-field changes applied: * [ [ 'field' => string, 'label' => string, 'before' => string, 'after' => string ], ... ]. * * @var array> */ protected $changes = array(); /** * Record a single applied change. * * @param string $field Field id. * @param string $label Human label. * @param string $before Old value. * @param string $after New value. * @return void */ public function add_change( $field, $label, $before, $after ) { $this->changed = true; $this->changes[] = array( 'field' => (string) $field, 'label' => (string) $label, 'before' => (string) $before, 'after' => (string) $after, ); } /** * Whether anything changed. * * @return bool */ public function is_changed() { return $this->changed; } /** * Get all recorded changes. * * @return array> */ public function get_changes() { return $this->changes; } }