Code Duplication    Length = 5-11 lines in 2 locations

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

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

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

@@ 158-162 (lines=5) @@
155
156
		// Bail if we're not trying to delete connection owner.
157
		$user_ids_to_delete = array();
158
		if ( isset( $_REQUEST['users'] ) ) {
159
			$user_ids_to_delete = array_map( 'sanitize_text_field', wp_unslash( $_REQUEST['users'] ) );
160
		} elseif ( isset( $_REQUEST['user'] ) ) {
161
			$user_ids_to_delete[] = sanitize_text_field( wp_unslash( $_REQUEST['user'] ) );
162
		}
163
164
		// phpcs:enable
165
		$user_ids_to_delete        = array_map( 'absint', $user_ids_to_delete );