Code Duplication    Length = 6-8 lines in 2 locations

class.jetpack-autoupdate.php 2 locations

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