Code Duplication    Length = 6-8 lines in 2 locations

class.jetpack-autoupdate.php 2 locations

@@ 70-77 (lines=8) @@
67
		  "autoupdate":true
68
		}
69
		*/
70
		if ( ( in_array( $item->slug, $autoupdate_themes_translations )
71
		       || in_array( $item->slug, $autoupdate_theme_list ) )
72
		     && 'theme' === $item->type
73
		) {
74
			$this->expect( $item->type + ':' + $item->slug, 'translation' );
75
76
			return true;
77
		}
78
79
		// Plugins
80
		$autoupdate_plugin_translations = Jetpack_Options::get_option( 'autoupdate_plugins_translations', array() );
@@ 85-90 (lines=6) @@
82
		$plugin_files = array_unique( array_merge( $autoupdate_plugin_list, $autoupdate_plugin_translations ) );
83
		$plugin_slugs = array_map( array( __CLASS__, 'get_plugin_slug' ), $plugin_files );
84
85
		if ( in_array( $item->slug, $plugin_slugs )
86
		     && 'plugin' === $item->type
87
		) {
88
			$this->expect( $item->type + ':' + $item->slug, 'translation' );
89
			return true;
90
		}
91
92
		return $update;
93
	}