From a02fb9e77141b0bfc25a26c45741842ad8cc9614 Mon Sep 17 00:00:00 2001 From: "Larry E. Masters" Date: Mon, 28 Dec 2015 18:40:14 -0500 Subject: [PATCH] Fixing code sniffer errors --- lib/Cake/Model/Datasource/CakeSession.php | 8 ++++---- lib/Cake/Model/Datasource/Session/CacheSession.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Cake/Model/Datasource/CakeSession.php b/lib/Cake/Model/Datasource/CakeSession.php index ec5e172cb..35c55e1ef 100644 --- a/lib/Cake/Model/Datasource/CakeSession.php +++ b/lib/Cake/Model/Datasource/CakeSession.php @@ -217,7 +217,7 @@ class CakeSession { * @return bool True if session has been started. */ public static function started() { - if (PHP_VERSION >=5.4) { + if (PHP_VERSION >= 5.4) { return isset($_SESSION) && (session_status() === PHP_SESSION_ACTIVE); } return isset($_SESSION) && session_id(); @@ -463,12 +463,12 @@ class CakeSession { } if (static::started()) { - if (session_id() && static::_hasSession()){ + if (session_id() && static::_hasSession()) { session_write_close(); session_start(); } session_destroy(); - if (isset($_COOKIE[static::_cookieName()])){ + if (isset($_COOKIE[static::_cookieName()])) { unset($_COOKIE[static::_cookieName()]); } } @@ -762,7 +762,7 @@ class CakeSession { if (isset($_COOKIE[session_name()])) { setcookie(Configure::read('Session.cookie'), '', time() - 42000, static::$path); } - if (!headers_sent()){ + if (!headers_sent()) { session_write_close(); session_start(); session_regenerate_id(true); diff --git a/lib/Cake/Model/Datasource/Session/CacheSession.php b/lib/Cake/Model/Datasource/Session/CacheSession.php index 81ad780dc..ce846176f 100644 --- a/lib/Cake/Model/Datasource/Session/CacheSession.php +++ b/lib/Cake/Model/Datasource/Session/CacheSession.php @@ -53,7 +53,7 @@ class CacheSession implements CakeSessionHandlerInterface { */ public function read($id) { $data = Cache::read($id, Configure::read('Session.handler.config')); - if (empty($data)){ + if (empty($data)) { return ''; } return $data;