Skip to content

Commit 08d7e42

Browse files
committed
DateTime: method reorder
1 parent cc287b7 commit 08d7e42

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/Utils/DateTime.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74,22 +74,6 @@ public static function fromParts(int $year, int $month, int $day, int $hour = 0,
7474
}
7575

7676

77-
public function __toString(): string
78-
{
79-
return $this->format('Y-m-d H:i:s');
80-
}
81-
82-
83-
/**
84-
* @return static
85-
*/
86-
public function modifyClone(string $modify = '')
87-
{
88-
$dolly = clone $this;
89-
return $modify ? $dolly->modify($modify) : $dolly;
90-
}
91-
92-
9377
/**
9478
* Returns new DateTime object formatted according to the specified format.
9579
* @param string $format The format the $time parameter should be in
@@ -121,4 +105,20 @@ public function jsonSerialize(): string
121105
{
122106
return $this->format('c');
123107
}
108+
109+
110+
public function __toString(): string
111+
{
112+
return $this->format('Y-m-d H:i:s');
113+
}
114+
115+
116+
/**
117+
* @return static
118+
*/
119+
public function modifyClone(string $modify = '')
120+
{
121+
$dolly = clone $this;
122+
return $modify ? $dolly->modify($modify) : $dolly;
123+
}
124124
}

0 commit comments

Comments
 (0)