WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php
protected function analyse_implode( $implode_token ) {
		$implode_params = $this->get_function_call_parameters( $implode_token );

		if ( empty( $implode_params ) || \count( $implode_params ) !== 2 ) {
			return false;
		}

		if ( preg_match( '`^(["\']), ?\1$`', $implode_params[1]['raw'] ) !== 1 ) {
			return false;
		}

		if ( strpos( strtolower( $implode_params[2]['raw'] ), 'array_fill' ) === false ) {
			return false;
		}

		$array_fill = $this->phpcsFile->findNext(
			Tokens::$emptyTokens,
			$implode_params[2]['start'],
			$implode_params[2]['end'],
			true
		);

		if ( \T_STRING !== $this->tokens[ $array_fill ]['code']
			|| 'array_fill' !== strtolower( $this->tokens[ $array_fill ]['content'] )
		) {
			return false;
		}

		$array_fill_params = $this->get_function_call_parameters( $array_fill );

		if ( empty( $array_fill_params ) || \count( $array_fill_params ) !== 3 ) {
			return false;
		}

		return (bool) preg_match( '`^(["\'])%[dfFs]\1$`', $array_fill_params[3]['raw'] );
	}
protected function analyse_implode( $implode_token ) {
		$implode_params = $this->get_function_call_parameters( $implode_token );

		if ( empty( $implode_params ) || \count( $implode_params ) !== 2 ) {
			return false;
		}

		if ( preg_match( '`^(["\']), ?\1$`', $implode_params[1]['raw'] ) !== 1 ) {
			return false;
		}

		if ( strpos( strtolower( $implode_params[2]['raw'] ), 'array_fill' ) === false ) {
			return false;
		}

		$array_fill = $this->phpcsFile->findNext(
			Tokens::$emptyTokens,
			$implode_params[2]['start'],
			$implode_params[2]['end'],
			true
		);

		if ( \T_STRING !== $this->tokens[ $array_fill ]['code']
			|| 'array_fill' !== strtolower( $this->tokens[ $array_fill ]['content'] )
		) {
			return false;
		}

		$array_fill_params = $this->get_function_call_parameters( $array_fill );

		if ( empty( $array_fill_params ) || \count( $array_fill_params ) !== 3 ) {
			return false;
		}

		return (bool) preg_match( '`^(["\'])%[dfFs]\1$`', $array_fill_params[3]['raw'] );
	}
Analyse an implode() function call to see if it contains a specific code pattern
to dynamically create placeholders.

The pattern we are searching for is:
`implode( ',', array_fill( 0, count( $something ), '%s' ) )`

This pattern presumes unquoted placeholders!

@since 0.14.0

@param int $implode_token The stackPtr to the implode function call.

@return bool True if the pattern is found, false otherwise.