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

@@ 120-127 (lines=8) @@
117
	 *
118
	 * @return array $instance Updated safe values to be saved.
119
	 */
120
	public function update( $new_instance, $old_instance ) {
121
		$instance = array();
122
		$instance['title'] = wp_kses( $new_instance['title'], array() );
123
		if ( $instance['title'] === $this->default_title ) {
124
			$instance['title'] = false; // Store as false in case of language change
125
		}
126
		return $instance;
127
	}
128
129
}
130