Code Duplication    Length = 3-3 lines in 2 locations

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 ( 'users' === $module_name && isset( $args[ $module_name ] ) && 'initial' === $args[ $module_name ] ) {

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

@@ 2257-2259 (lines=3) @@
2254
			$attributes['required'] = false;
2255
2256
		// parse out comma-separated options list (for selects, radios, and checkbox-multiples)
2257
		if ( !empty( $attributes['options'] ) && is_string( $attributes['options'] ) ) {
2258
			$attributes['options'] = array_map( 'trim', explode( ',', $attributes['options'] ) );
2259
		}
2260
2261
		if ( $form ) {
2262
			// make a unique field ID based on the label, with an incrementing number if needed to avoid clashes