Skip to content

Commit

Permalink
It is recommended not to use reserved keyword "object".
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Oct 13, 2023
1 parent a5a1a81 commit b5dcf67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DateTimeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,10 @@ public static function create_from_format( $format, $time, \DateTimeZone $timezo
*
* @link https://www.php.net/manual/en/datetime.createfrominterface.php
* @link https://php.watch/versions/8.0/datetime-immutable-createfrominterface
* @param \DateTimeInterface $object The mutable DateTime object that you want to convert to an immutable version.
* @param \DateTimeInterface $value The mutable DateTime object that you want to convert to an immutable version.
* @return self
*/
public static function create_from_interface( \DateTimeInterface $object ): self {
return new self( $object->format( 'Y-m-d H:i:s.u' ), $object->getTimezone() );
public static function create_from_interface( \DateTimeInterface $value ): self {
return new self( $value->format( 'Y-m-d H:i:s.u' ), $value->getTimezone() );
}
}

0 comments on commit b5dcf67

Please sign in to comment.