File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,10 +105,10 @@ public function format_i18n( $format = null );
105105 * @link https://www.php.net/manual/en/datetime.createfromformat.php
106106 * @link https://www.php.net/manual/en/datetimeimmutable.createfromformat.php
107107 *
108- * @param string $format Format accepted by date().
109- * @param string $time String representing the time.
110- * @param \DateTimeZone $timezone A DateTimeZone object representing the desired time zone.
108+ * @param string $format Format accepted by date().
109+ * @param string $time String representing the time.
110+ * @param \DateTimeZone|null $timezone A DateTimeZone object representing the desired time zone.
111111 * @return self|false
112112 */
113- public static function create_from_format ( $ format , $ time , \DateTimeZone $ timezone = null );
113+ public static function create_from_format ( $ format , $ time , ? \DateTimeZone $ timezone = null );
114114}
Original file line number Diff line number Diff line change @@ -273,14 +273,14 @@ public static function createFromFormat( // phpcs:ignore WordPress.NamingConvent
273273 *
274274 * @since 1.0.1
275275 *
276- * @param string $format Format accepted by date().
277- * @param string $time String representing the time.
278- * @param \DateTimeZone $timezone A DateTimeZone object representing the desired time zone.
276+ * @param string $format Format accepted by date().
277+ * @param string $time String representing the time.
278+ * @param \DateTimeZone|null $timezone A DateTimeZone object representing the desired time zone.
279279 *
280280 * @return self|false
281281 */
282282 #[\ReturnTypeWillChange]
283- public static function create_from_format ( $ format , $ time , \DateTimeZone $ timezone = null ) {
283+ public static function create_from_format ( $ format , $ time , ? \DateTimeZone $ timezone = null ) {
284284 /*
285285 * In PHP 5.6 or lower it's not possible to pass in an empty (null) timezone object.
286286 * This will result in a `DateTime::createFromFormat() expects parameter 3 to be DateTimeZone, null given` error.
You can’t perform that action at this time.
0 commit comments