Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

replacing is_integer() with is_int()

  • Loading branch information...
commit aa87791432b153ab2fe958e3a3b1e9fe7ab52e5f 1 parent a38a616
@dogmatic69 dogmatic69 authored
View
4 lib/Cake/Cache/Cache.php
@@ -366,7 +366,7 @@ public static function increment($key, $offset = 1, $config = 'default') {
}
$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 @@ public static function decrement($key, $offset = 1, $config = 'default') {
}
$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);
View
2  lib/Cake/Controller/Component/CookieComponent.php
@@ -398,7 +398,7 @@ protected function _expire($expires = null) {
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);
View
4 lib/Cake/Network/CakeResponse.php
@@ -746,7 +746,7 @@ public function disableCache() {
* @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 @@ public function etag($tag = null, $weak = false) {
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);
View
2  lib/Cake/Routing/Route/CakeRoute.php
@@ -219,7 +219,7 @@ public function parse($url) {
if (isset($route[$key])) {
continue;
}
- if (is_integer($key)) {
+ if (is_int($key)) {
$route['pass'][] = $value;
continue;
}
View
4 lib/Cake/Utility/CakeTime.php
@@ -310,7 +310,7 @@ public static function fromString($dateString, $timezone = null) {
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 @@ public static function toServer($dateString, $timezone = null, $format = 'Y-m-d
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);
View
2  lib/Cake/Utility/Xml.php
@@ -174,7 +174,7 @@ public static function fromArray($input, $options = array()) {
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'));
}
Please sign in to comment.
Something went wrong with that request. Please try again.