Index: src/wp-includes/template.php
===================================================================
--- src/wp-includes/template.php	(revision 40958)
+++ src/wp-includes/template.php	(working copy)
@@ -16,15 +16,17 @@
  *
  * @since 1.5.0
  *
- * @param string $type      Filename without extension.
- * @param array  $templates An optional list of template candidates
+ * @param string $type Filename without extension.
+ * @param array $templates An optional list of template candidates
+ *
  * @return string Full path to template file.
  */
 function get_query_template( $type, $templates = array() ) {
 	$type = preg_replace( '|[^a-z0-9-]+|', '', $type );
 
-	if ( empty( $templates ) )
-		$templates = array("{$type}.php");
+	if ( empty( $templates ) ) {
+		$templates = array( "{$type}.php" );
+	}
 
 	/**
 	 * Filters the list of template filenames that are searched for when retrieving a template to use.
@@ -55,9 +57,9 @@
 	 * @since 1.5.0
 	 * @since 4.8.0 The `$type` and `$templates` parameters were added.
 	 *
-	 * @param string $template  Path to the template. See locate_template().
-	 * @param string $type      Filename without extension.
-	 * @param array  $templates A list of template candidates, in descending order of priority.
+	 * @param string $template Path to the template. See locate_template().
+	 * @param string $type Filename without extension.
+	 * @param array $templates A list of template candidates, in descending order of priority.
 	 */
 	return apply_filters( "{$type}_template", $template, $type, $templates );
 }
@@ -75,7 +77,7 @@
  * @return string Full path to index template file.
  */
 function get_index_template() {
-	return get_query_template('index');
+	return get_query_template( 'index' );
 }
 
 /**
@@ -91,7 +93,7 @@
  * @return string Full path to 404 template file.
  */
 function get_404_template() {
-	return get_query_template('404');
+	return get_query_template( '404' );
 }
 
 /**
@@ -112,7 +114,7 @@
 	$templates = array();
 
 	if ( count( $post_types ) == 1 ) {
-		$post_type = reset( $post_types );
+		$post_type   = reset( $post_types );
 		$templates[] = "archive-{$post_type}.php";
 	}
 	$templates[] = 'archive.php';
@@ -134,8 +136,9 @@
  */
 function get_post_type_archive_template() {
 	$post_type = get_query_var( 'post_type' );
-	if ( is_array( $post_type ) )
+	if ( is_array( $post_type ) ) {
 		$post_type = reset( $post_type );
+	}
 
 	$obj = get_post_type_object( $post_type );
 	if ( ! ( $obj instanceof WP_Post_Type ) || ! $obj->has_archive ) {
@@ -335,7 +338,7 @@
  * @return string Full path to date template file.
  */
 function get_date_template() {
-	return get_query_template('date');
+	return get_query_template( 'date' );
 }
 
 /**
@@ -369,7 +372,7 @@
  * @return string Full path to front page template file.
  */
 function get_front_page_template() {
-	$templates = array('front-page.php');
+	$templates = array( 'front-page.php' );
 
 	return get_query_template( 'front_page', $templates );
 }
@@ -403,20 +406,22 @@
  * @return string Full path to page template file.
  */
 function get_page_template() {
-	$id = get_queried_object_id();
+	$id       = get_queried_object_id();
 	$template = get_page_template_slug();
-	$pagename = get_query_var('pagename');
+	$pagename = get_query_var( 'pagename' );
 
 	if ( ! $pagename && $id ) {
 		// If a static page is set as the front page, $pagename will not be set. Retrieve it from the queried object
 		$post = get_queried_object();
-		if ( $post )
+		if ( $post ) {
 			$pagename = $post->post_name;
+		}
 	}
 
 	$templates = array();
-	if ( $template && 0 === validate_file( $template ) )
+	if ( $template && 0 === validate_file( $template ) ) {
 		$templates[] = $template;
+	}
 	if ( $pagename ) {
 		$pagename_decoded = urldecode( $pagename );
 		if ( $pagename_decoded !== $pagename ) {
@@ -424,8 +429,9 @@
 		}
 		$templates[] = "page-{$pagename}.php";
 	}
-	if ( $id )
+	if ( $id ) {
 		$templates[] = "page-{$id}.php";
+	}
 	$templates[] = 'page.php';
 
 	return get_query_template( 'page', $templates );
@@ -444,7 +450,7 @@
  * @return string Full path to search template file.
  */
 function get_search_template() {
-	return get_query_template('search');
+	return get_query_template( 'search' );
 }
 
 /**
@@ -622,19 +628,21 @@
  * @since 2.7.0
  *
  * @param string|array $template_names Template file(s) to search for, in order.
- * @param bool         $load           If true the template file will be loaded if it is found.
- * @param bool         $require_once   Whether to require_once or require. Default true. Has no effect if $load is false.
+ * @param bool $load If true the template file will be loaded if it is found.
+ * @param bool $require_once Whether to require_once or require. Default true. Has no effect if $load is false.
+ *
  * @return string The template filename if one is located.
  */
-function locate_template($template_names, $load = false, $require_once = true ) {
+function locate_template( $template_names, $load = false, $require_once = true ) {
 	$located = '';
 	foreach ( (array) $template_names as $template_name ) {
-		if ( !$template_name )
+		if ( ! $template_name ) {
 			continue;
-		if ( file_exists(STYLESHEETPATH . '/' . $template_name)) {
+		}
+		if ( file_exists( STYLESHEETPATH . '/' . $template_name ) ) {
 			$located = STYLESHEETPATH . '/' . $template_name;
 			break;
-		} elseif ( file_exists(TEMPLATEPATH . '/' . $template_name) ) {
+		} elseif ( file_exists( TEMPLATEPATH . '/' . $template_name ) ) {
 			$located = TEMPLATEPATH . '/' . $template_name;
 			break;
 		} elseif ( file_exists( ABSPATH . WPINC . '/theme-compat/' . $template_name ) ) {
@@ -643,8 +651,9 @@
 		}
 	}
 
-	if ( $load && '' != $located )
+	if ( $load && '' != $located ) {
 		load_template( $located, $require_once );
+	}
 
 	return $located;
 }
@@ -658,20 +667,20 @@
  *
  * @since 1.5.0
  *
- * @global array      $posts
- * @global WP_Post    $post
- * @global bool       $wp_did_header
- * @global WP_Query   $wp_query
+ * @global array $posts
+ * @global WP_Post $post
+ * @global bool $wp_did_header
+ * @global WP_Query $wp_query
  * @global WP_Rewrite $wp_rewrite
- * @global wpdb       $wpdb
- * @global string     $wp_version
- * @global WP         $wp
- * @global int        $id
+ * @global wpdb $wpdb
+ * @global string $wp_version
+ * @global WP $wp
+ * @global int $id
  * @global WP_Comment $comment
- * @global int        $user_ID
+ * @global int $user_ID
  *
  * @param string $_template_file Path to template file.
- * @param bool   $require_once   Whether to require_once or require. Default true.
+ * @param bool $require_once Whether to require_once or require. Default true.
  */
 function load_template( $_template_file, $require_once = true ) {
 	global $posts, $post, $wp_did_header, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID;
