Code Duplication    Length = 11-11 lines in 2 locations

projects/plugins/jetpack/modules/masterbar/admin-menu/class-admin-menu.php 2 locations

@@ 160-170 (lines=11) @@
157
	 *
158
	 * @param bool $wp_admin Optional. Whether links should point to Calypso or wp-admin. Default false (Calypso).
159
	 */
160
	public function add_posts_menu( $wp_admin = false ) {
161
		if ( $wp_admin ) {
162
			return;
163
		}
164
165
		$submenus_to_update = array(
166
			'edit.php'     => 'https://wordpress.com/posts/' . $this->domain,
167
			'post-new.php' => 'https://wordpress.com/post/' . $this->domain,
168
		);
169
		$this->update_submenus( 'edit.php', $submenus_to_update );
170
	}
171
172
	/**
173
	 * Adds Media menu.
@@ 192-202 (lines=11) @@
189
	 *
190
	 * @param bool $wp_admin Optional. Whether links should point to Calypso or wp-admin. Default false (Calypso).
191
	 */
192
	public function add_page_menu( $wp_admin = false ) {
193
		if ( $wp_admin ) {
194
			return;
195
		}
196
197
		$submenus_to_update = array(
198
			'edit.php?post_type=page'     => 'https://wordpress.com/pages/' . $this->domain,
199
			'post-new.php?post_type=page' => 'https://wordpress.com/page/' . $this->domain,
200
		);
201
		$this->update_submenus( 'edit.php?post_type=page', $submenus_to_update );
202
	}
203
204
	/**
205
	 * Adds Testimonials menu.