Code Duplication    Length = 3-3 lines in 2 locations

core/Container/User_Meta_Container.php 2 locations

@@ 168-170 (lines=3) @@
165
		$user = wp_get_current_user();
166
167
		$is_valid_capability = true;
168
		if ( !empty( $this->settings['show_for']['capabilities'] ) ) {
169
			$is_valid_capability = array_intersect( (array) $this->settings['show_for']['capabilities'], $user->allcaps );
170
		}
171
172
		$is_valid_role = true;
173
		if ( !empty( $this->settings['show_for']['roles'] ) ) {
@@ 173-175 (lines=3) @@
170
		}
171
172
		$is_valid_role = true;
173
		if ( !empty( $this->settings['show_for']['roles'] ) ) {
174
			$is_valid_role = array_intersect( (array) $this->settings['show_for']['roles'], $user->roles );
175
		}
176
177
		if ( ! $this->is_profile_page() || ! $is_valid_capability || ! $is_valid_role ) {
178
			return false;