/** * Returns true this instance happened within the specified interval * * This overridden method provides backwards compatible behavior for integers, * or strings with trailing spaces. This behavior is *deprecated* and will be * removed in future versions of CakePHP. * * @param string|int $timeInterval the numeric value with space then time type. * Example of valid types: 6 hours, 2 days, 1 minute. * @return bool */ public function isWithinNext($timeInterval) { $tmp = trim($timeInterval); if (is_numeric($tmp)) { $timeInterval = $tmp . ' days'; } return parent::isWithinNext($timeInterval); }