Code Duplication    Length = 7-8 lines in 2 locations

modules/widgets/blog-stats.php 1 location

@@ 115-121 (lines=7) @@
112
	 *
113
	 * @return array Updated safe values to be saved.
114
	 */
115
	function update( $new_instance, $old_instance ) {
116
		$instance          = array();
117
		$instance['title'] = wp_kses( $new_instance['title'], array() );
118
		$instance['hits']  = wp_kses( $new_instance['hits'], array() );
119
120
		return $instance;
121
	}
122
123
	/**
124
	 * Front-end display of widget.

modules/widgets/google-translate.php 1 location

@@ 184-191 (lines=8) @@
181
	 *
182
	 * @return array $instance Updated safe values to be saved.
183
	 */
184
	public function update( $new_instance, $old_instance ) {
185
		$instance = array();
186
		$instance['title'] = wp_kses( $new_instance['title'], array() );
187
		if ( $instance['title'] === $this->default_title ) {
188
			$instance['title'] = false; // Store as false in case of language change
189
		}
190
		return $instance;
191
	}
192
193
}
194