Code Duplication    Length = 8-9 lines in 2 locations

modules/memberships/class-jetpack-memberships.php 1 location

@@ 79-87 (lines=9) @@
76
	 *
77
	 * @return Jetpack_Memberships
78
	 */
79
	public static function get_instance() {
80
		if ( ! self::$instance ) {
81
			self::$instance = new self();
82
			self::$instance->register_init_hook();
83
			// Yes, `personal-bundle` with a dash, `jetpack_personal` with an underscore. Check the v1.5 endpoint to verify.
84
			self::$required_plan = ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ? 'personal-bundle' : 'jetpack_personal';
85
		}
86
87
		return self::$instance;
88
	}
89
	/**
90
	 * Get the map that defines the shape of CPT post. keys are names of fields and

modules/simple-payments/simple-payments.php 1 location

@@ 32-39 (lines=8) @@
29
	// Classic singleton pattern:
30
	private static $instance;
31
	private function __construct() {}
32
	static function getInstance() {
33
		if ( ! self::$instance ) {
34
			self::$instance = new self();
35
			self::$instance->register_init_hooks();
36
			self::$required_plan = ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ? 'value_bundle' : 'jetpack_premium';
37
		}
38
		return self::$instance;
39
	}
40
41
	private function register_scripts_and_styles() {
42
		/**