Permalink
Browse files

fixed some syntax errors

  • Loading branch information...
1 parent b918895 commit 2d6197aac3631598ad3c9a285d955d439b83ea0d @nicholas-eden committed Sep 6, 2013
Showing with 7 additions and 4 deletions.
  1. +7 −4 src/Carbon/Carbon.php
View
@@ -71,13 +71,13 @@ class Carbon extends DateTime
self::SATURDAY => 'Saturday'
);
- private static $relativeKeywords = array() {
+ private static $relativeKeywords = array(
'this',
'next',
'last',
'tomorrow',
'yesterday'
- };
+ );
/**
* Number of X in Y
@@ -743,9 +743,12 @@ public static function hasRelativeKeywords($time) {
*/
public static function getRelativeTest($time) {
$testNow = static::getTestNow();
- $relativeDate = new static($testNow->toDateString() . ' ' . $time)->setTime($testNow->format('h'), $testNow->format('i'), $testNow->format('s'));
+
+ $instance = new static($testNow->toDateString() . ' ' . $time);
+ $instance->setTime($testNow->format('h'), $testNow->format('i'), $testNow->format('s'));
+ $relativeDate = $instance;
}
-}
+
///////////////////////////////////////////////////////////////////
/////////////////////// STRING FORMATTING /////////////////////////
///////////////////////////////////////////////////////////////////

0 comments on commit 2d6197a

Please sign in to comment.