Code Duplication    Length = 15-15 lines in 2 locations

includes/fields/class-gravityview-field-is-fulfilled.php 1 location

@@ 75-89 (lines=15) @@
72
	 *
73
	 * @return string
74
	 */
75
	private function get_string_from_value( $value ) {
76
77
		switch ( intval( $value ) ) {
78
			case self::NOT_FULFILLED:
79
			default:
80
				$return = __('Not Fulfilled', 'gravityview');
81
				break;
82
83
			case self::FULFILLED:
84
				$return = __('Fulfilled', 'gravityview');
85
				break;
86
		}
87
88
		return $return;
89
	}
90
91
	/**
92
	 * Add {is_fulfilled} merge tag

includes/fields/class-gravityview-field-transaction-type.php 1 location

@@ 76-90 (lines=15) @@
73
	 *
74
	 * @return string Based on $value; `1`: "One-Time Payment"; `2`: "Subscription"
75
	 */
76
	private function get_string_from_value( $value ) {
77
78
		switch ( intval( $value ) ) {
79
			case self::ONE_TIME_PAYMENT:
80
			default:
81
				$return = __('One-Time Payment', 'gravityview');
82
				break;
83
84
			case self::SUBSCRIPTION:
85
				$return = __('Subscription', 'gravityview');
86
				break;
87
		}
88
89
		return $return;
90
	}
91
}
92
93
new GravityView_Field_Transaction_Type;