Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Simplifying returns

  • Loading branch information...
commit 543f40c91ea2ea9c2c2a1b5413b8d46bea9ebf30 1 parent 09b466f
@lorenzo lorenzo authored
Showing with 5 additions and 10 deletions.
  1. +5 −10 cake/libs/view/helpers/time.php
View
15 cake/libs/view/helpers/time.php
@@ -252,8 +252,7 @@ function daysAsSql($begin, $end, $fieldName, $userOffset = null) {
*/
function dayAsSql($dateString, $fieldName, $userOffset = null) {
$date = $this->fromString($dateString, $userOffset);
- $ret = $this->daysAsSql($dateString, $dateString, $fieldName);
- return $ret;
+ return $this->daysAsSql($dateString, $dateString, $fieldName);
}
/**
@@ -368,8 +367,7 @@ function toQuarter($dateString, $range = false) {
* @return integer Unix timestamp
*/
function toUnix($dateString, $userOffset = null) {
- $ret = $this->fromString($dateString, $userOffset);
- return $ret;
+ return $this->fromString($dateString, $userOffset);
}
/**
@@ -381,8 +379,7 @@ function toUnix($dateString, $userOffset = null) {
*/
function toAtom($dateString, $userOffset = null) {
$date = $this->fromString($dateString, $userOffset);
- $ret = date('Y-m-d\TH:i:s\Z', $date);
- return $ret;
+ return date('Y-m-d\TH:i:s\Z', $date);
}
/**
@@ -394,8 +391,7 @@ function toAtom($dateString, $userOffset = null) {
*/
function toRSS($dateString, $userOffset = null) {
$date = $this->fromString($dateString, $userOffset);
- $ret = date("r", $date);
- return $ret;
+ return date("r", $date);
}
/**
@@ -635,8 +631,7 @@ function gmt($string = null) {
$day = intval(date("j", $string));
$year = intval(date("Y", $string));
- $return = gmmktime($hour, $minute, $second, $month, $day, $year);
- return $return;
+ return gmmktime($hour, $minute, $second, $month, $day, $year);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.