Code Duplication    Length = 3-3 lines in 2 locations

modules/contact-form/grunion-contact-form.php 1 location

@@ 2191-2193 (lines=3) @@
2188
			$attributes['required'] = false;
2189
2190
		// parse out comma-separated options list (for selects, radios, and checkbox-multiples)
2191
		if ( !empty( $attributes['options'] ) && is_string( $attributes['options'] ) ) {
2192
			$attributes['options'] = array_map( 'trim', explode( ',', $attributes['options'] ) );
2193
		}
2194
2195
		if ( $form ) {
2196
			// make a unique field ID based on the label, with an incrementing number if needed to avoid clashes

json-endpoints/jetpack/class.jetpack-json-api-sync-endpoint.php 1 location

@@ 18-20 (lines=3) @@
15
16
		// convert list of modules in comma-delimited format into an array
17
		// of "$modulename => true"
18
		if ( isset( $args['modules'] ) && ! empty( $args['modules'] ) ) {
19
			$modules = array_map( '__return_true', array_flip( array_map( 'trim', explode( ',', $args['modules'] ) ) ) );
20
		}
21
22
		foreach ( array( 'posts', 'comments', 'users' ) as $module_name ) {
23
			if ( isset( $args[ $module_name ] ) ) {