Browse Source

Merge pull request #7445 from ndm2/7440-follow-up

#7440 Follow up - Revert explicit type hint, rely on doc block hint instead
Mark Story 10 years ago
parent
commit
9c3f728ca6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/I18n/Time.php

+ 2 - 2
src/I18n/Time.php

@@ -858,10 +858,10 @@ class Time extends Carbon implements JsonSerializable
     /**
      * Convenience method for getting the remaining time from a given time.
      *
-     * @param \DateTime $datetime The date to get the remaining time from.
+     * @param \DateTime|\DateTimeImmutable $datetime The date to get the remaining time from.
      * @return \DateInterval|bool The DateInterval object representing the difference between the two dates or FALSE on failure.
      */
-    public static function fromNow(DateTime $datetime)
+    public static function fromNow($datetime)
     {
         $timeNow = new Time();
         return $timeNow->diff($datetime);