From aa87791432b153ab2fe958e3a3b1e9fe7ab52e5f Mon Sep 17 00:00:00 2001 From: dogmatic69 Date: Sat, 15 Sep 2012 11:15:01 +0100 Subject: [PATCH] replacing is_integer() with is_int() --- lib/Cake/Cache/Cache.php | 4 ++-- lib/Cake/Controller/Component/CookieComponent.php | 2 +- lib/Cake/Network/CakeResponse.php | 4 ++-- lib/Cake/Routing/Route/CakeRoute.php | 2 +- lib/Cake/Utility/CakeTime.php | 4 ++-- lib/Cake/Utility/Xml.php | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Cake/Cache/Cache.php b/lib/Cake/Cache/Cache.php index cb705f6f8..f7ac61122 100644 --- a/lib/Cake/Cache/Cache.php +++ b/lib/Cake/Cache/Cache.php @@ -366,7 +366,7 @@ class Cache { } $key = self::$_engines[$config]->key($key); - if (!$key || !is_integer($offset) || $offset < 0) { + if (!$key || !is_int($offset) || $offset < 0) { return false; } $success = self::$_engines[$config]->increment($settings['prefix'] . $key, $offset); @@ -394,7 +394,7 @@ class Cache { } $key = self::$_engines[$config]->key($key); - if (!$key || !is_integer($offset) || $offset < 0) { + if (!$key || !is_int($offset) || $offset < 0) { return false; } $success = self::$_engines[$config]->decrement($settings['prefix'] . $key, $offset); diff --git a/lib/Cake/Controller/Component/CookieComponent.php b/lib/Cake/Controller/Component/CookieComponent.php index e105bc9ec..fdf434458 100644 --- a/lib/Cake/Controller/Component/CookieComponent.php +++ b/lib/Cake/Controller/Component/CookieComponent.php @@ -398,7 +398,7 @@ class CookieComponent extends Component { return $this->_expires = 0; } - if (is_integer($expires) || is_numeric($expires)) { + if (is_int($expires) || is_numeric($expires)) { return $this->_expires = $now + intval($expires); } return $this->_expires = strtotime($expires, $now); diff --git a/lib/Cake/Network/CakeResponse.php b/lib/Cake/Network/CakeResponse.php index 7d49fdff6..15c1892b6 100644 --- a/lib/Cake/Network/CakeResponse.php +++ b/lib/Cake/Network/CakeResponse.php @@ -746,7 +746,7 @@ class CakeResponse { * @return void */ public function cache($since, $time = '+1 day') { - if (!is_integer($time)) { + if (!is_int($time)) { $time = strtotime($time); } $this->header(array( @@ -1008,7 +1008,7 @@ class CakeResponse { protected function _getUTCDate($time = null) { if ($time instanceof DateTime) { $result = clone $time; - } elseif (is_integer($time)) { + } elseif (is_int($time)) { $result = new DateTime(date('Y-m-d H:i:s', $time)); } else { $result = new DateTime($time); diff --git a/lib/Cake/Routing/Route/CakeRoute.php b/lib/Cake/Routing/Route/CakeRoute.php index 8fab212cf..e76dc2bfb 100644 --- a/lib/Cake/Routing/Route/CakeRoute.php +++ b/lib/Cake/Routing/Route/CakeRoute.php @@ -219,7 +219,7 @@ class CakeRoute { if (isset($route[$key])) { continue; } - if (is_integer($key)) { + if (is_int($key)) { $route['pass'][] = $value; continue; } diff --git a/lib/Cake/Utility/CakeTime.php b/lib/Cake/Utility/CakeTime.php index 53db5688d..be3e83afb 100644 --- a/lib/Cake/Utility/CakeTime.php +++ b/lib/Cake/Utility/CakeTime.php @@ -310,7 +310,7 @@ class CakeTime { return false; } - if (is_integer($dateString) || is_numeric($dateString)) { + if (is_int($dateString) || is_numeric($dateString)) { $date = intval($dateString); } elseif (is_object($dateString) && $dateString instanceof DateTime) { $clone = clone $dateString; @@ -589,7 +589,7 @@ class CakeTime { if ($dateString instanceof DateTime) { $date = $dateString; - } elseif (is_integer($dateString) || is_numeric($dateString)) { + } elseif (is_int($dateString) || is_numeric($dateString)) { $dateString = (int)$dateString; $date = new DateTime('@' . $dateString); diff --git a/lib/Cake/Utility/Xml.php b/lib/Cake/Utility/Xml.php index f8662b282..f58a01989 100644 --- a/lib/Cake/Utility/Xml.php +++ b/lib/Cake/Utility/Xml.php @@ -174,7 +174,7 @@ class Xml { throw new XmlException(__d('cake_dev', 'Invalid input.')); } $key = key($input); - if (is_integer($key)) { + if (is_int($key)) { throw new XmlException(__d('cake_dev', 'The key of input must be alphanumeric')); }