From 2428b95d717cea2034eb8cc39ee5973b70ab866d Mon Sep 17 00:00:00 2001
From: Erick Hitter <git-contrib@ethitter.com>
Date: Mon, 3 Jun 2019 19:51:32 -0700
Subject: [PATCH] PHPCS

---
 inc/class-wp-redis-user-session-storage.php | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/inc/class-wp-redis-user-session-storage.php b/inc/class-wp-redis-user-session-storage.php
index c6fa822..0be6ed0 100644
--- a/inc/class-wp-redis-user-session-storage.php
+++ b/inc/class-wp-redis-user-session-storage.php
@@ -21,7 +21,7 @@ class WP_Redis_User_Session_Storage extends WP_Session_Tokens {
 	/**
 	 * Holds the Redis client.
 	 *
-	 * @var
+	 * @var Redis
 	 */
 	private $redis;
 
@@ -41,9 +41,11 @@ class WP_Redis_User_Session_Storage extends WP_Session_Tokens {
 
 	/**
 	 * Create Redis connection using the Redis PECL extension
+	 *
+	 * @param int $user_id User ID.
 	 */
 	public function __construct( $user_id ) {
-		// General Redis settings
+		// General Redis settings.
 		$redis = array(
 			'host'       => '127.0.0.1',
 			'port'       => 6379,
@@ -67,14 +69,14 @@ class WP_Redis_User_Session_Storage extends WP_Session_Tokens {
 			$redis['database'] = WP_REDIS_USER_SESSION_DB;
 		}
 		if ( defined( 'WP_REDIS_USER_SESSION_SERIALIZER' ) && WP_REDIS_USER_SESSION_SERIALIZER ) {
-			$redis['serializer'] =  WP_REDIS_USER_SESSION_SERIALIZER;
+			$redis['serializer'] = WP_REDIS_USER_SESSION_SERIALIZER;
 		}
 
 		// Use Redis PECL library.
 		try {
 			$this->redis = new Redis();
 
-			// Socket preferred, but TCP supported
+			// Socket preferred, but TCP supported.
 			if ( $redis['socket'] ) {
 				$this->redis->connect( $redis['socket'] );
 			} else {
@@ -96,7 +98,7 @@ class WP_Redis_User_Session_Storage extends WP_Session_Tokens {
 			$this->redis_connected = false;
 		}
 
-		// Ensure Core's session constructor fires
+		// Pass user ID to parent.
 		parent::__construct( $user_id );
 	}
 
-- 
GitLab