Skip to content

Commit

Permalink
code formatting, fixes PHPCS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlaefer committed Oct 1, 2014
1 parent 388e412 commit fd2dd58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Utility/CakeTimeTest.php
Expand Up @@ -279,7 +279,7 @@ public function testTimeAgoInWordsWithFormat() {
$this->assertEquals('on 2007-09-25', $result);

$result = $this->Time->timeAgoInWords('2007-9-25', '%x');
$this->assertEquals('on '. strftime('%x', strtotime('2007-9-25')), $result);
$this->assertEquals('on ' . strftime('%x', strtotime('2007-9-25')), $result);

$result = $this->Time->timeAgoInWords(
strtotime('+2 weeks +2 days'),
Expand Down
12 changes: 6 additions & 6 deletions lib/Cake/Utility/CakeTime.php
Expand Up @@ -896,22 +896,22 @@ public static function timeAgoInWords($dateTime, $options = array()) {
$relativeDate[] = __dn('cake', '%d year', '%d years', $years, $years);
}
if ($accuracyNum >= 2 && $months > 0) {
$relativeDate[] = __dn('cake', '%d month', '%d months', $months, $months);
$relativeDate[] = __dn('cake', '%d month', '%d months', $months, $months);
}
if ($accuracyNum >= 3 && $weeks > 0) {
$relativeDate[] = __dn('cake', '%d week', '%d weeks', $weeks, $weeks);
$relativeDate[] = __dn('cake', '%d week', '%d weeks', $weeks, $weeks);
}
if ($accuracyNum >= 4 && $days > 0) {
$relativeDate[] = __dn('cake', '%d day', '%d days', $days, $days);
$relativeDate[] = __dn('cake', '%d day', '%d days', $days, $days);
}
if ($accuracyNum >= 5 && $hours > 0) {
$relativeDate[] = __dn('cake', '%d hour', '%d hours', $hours, $hours);
$relativeDate[] = __dn('cake', '%d hour', '%d hours', $hours, $hours);
}
if ($accuracyNum >= 6 && $minutes > 0) {
$relativeDate[] = __dn('cake', '%d minute', '%d minutes', $minutes, $minutes);
$relativeDate[] = __dn('cake', '%d minute', '%d minutes', $minutes, $minutes);
}
if ($accuracyNum >= 7 && $seconds > 0) {
$relativeDate[] = __dn('cake', '%d second', '%d seconds', $seconds, $seconds);
$relativeDate[] = __dn('cake', '%d second', '%d seconds', $seconds, $seconds);
}
$relativeDate = implode(', ', $relativeDate);

Expand Down

0 comments on commit fd2dd58

Please sign in to comment.