Code Duplication    Length = 5-11 lines in 2 locations

modules/google-analytics/classes/wp-google-analytics-legacy.php 1 location

@@ 77-87 (lines=11) @@
74
		);
75
76
		$track = array();
77
		if ( is_404() ) {
78
			// This is a 404 and we are supposed to track them.
79
			$custom_vars[] = "_gaq.push(['_trackEvent', '404', document.location.href, document.referrer]);";
80
		} elseif (
81
			is_search()
82
			&& isset( $_REQUEST['s'] )
83
		) {
84
			// Set track for searches, if it's a search, and we are supposed to.
85
			$track['data'] = sanitize_text_field( wp_unslash( $_REQUEST['s'] ) ); // Input var okay.
86
			$track['code'] = 'search';
87
		}
88
89
		if ( ! empty( $track ) ) {
90
			$track['url'] = $this->_get_url( $track );

packages/jitm/src/class-jitm.php 1 location

@@ 189-193 (lines=5) @@
186
187
		// Bail if we're not trying to delete connection owner.
188
		$user_ids_to_delete = array();
189
		if ( isset( $_REQUEST['users'] ) ) {
190
			$user_ids_to_delete = array_map( 'sanitize_text_field', wp_unslash( $_REQUEST['users'] ) );
191
		} elseif ( isset( $_REQUEST['user'] ) ) {
192
			$user_ids_to_delete[] = sanitize_text_field( wp_unslash( $_REQUEST['user'] ) );
193
		}
194
195
		// phpcs:enable
196
		$user_ids_to_delete        = array_map( 'absint', $user_ids_to_delete );