Code Duplication    Length = 7-7 lines in 3 locations

src/wp-includes/capabilities.php 3 locations

@@ 67-73 (lines=7) @@
64
			break;
65
		}
66
67
		if ( 'revision' == $post->post_type ) {
68
			$post = get_post( $post->post_parent );
69
			if ( ! $post ) {
70
				$caps[] = 'do_not_allow';
71
				break;
72
			}
73
		}
74
75
		if ( ( get_option( 'page_for_posts' ) == $post->ID ) || ( get_option( 'page_on_front' ) == $post->ID ) ) {
76
			$caps[] = 'manage_options';
@@ 133-139 (lines=7) @@
130
			break;
131
		}
132
133
		if ( 'revision' == $post->post_type ) {
134
			$post = get_post( $post->post_parent );
135
			if ( ! $post ) {
136
				$caps[] = 'do_not_allow';
137
				break;
138
			}
139
		}
140
141
		$post_type = get_post_type_object( $post->post_type );
142
		if ( ! $post_type ) {
@@ 192-198 (lines=7) @@
189
			break;
190
		}
191
192
		if ( 'revision' == $post->post_type ) {
193
			$post = get_post( $post->post_parent );
194
			if ( ! $post ) {
195
				$caps[] = 'do_not_allow';
196
				break;
197
			}
198
		}
199
200
		$post_type = get_post_type_object( $post->post_type );
201
		if ( ! $post_type ) {