mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-11 08:19:45 +00:00
BanEntry: remove nullable return from parseDate()
this function never returns null
This commit is contained in:
parent
b8778cb791
commit
a9fafbc5eb
@ -136,10 +136,10 @@ class BanEntry{
|
||||
/**
|
||||
* @param string $date
|
||||
*
|
||||
* @return \DateTime|null
|
||||
* @return \DateTime
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
private static function parseDate(string $date) : ?\DateTime{
|
||||
private static function parseDate(string $date) : \DateTime{
|
||||
$datetime = \DateTime::createFromFormat(self::$format, $date);
|
||||
if(!($datetime instanceof \DateTime)){
|
||||
throw new \RuntimeException("Error parsing date for BanEntry: " . implode(", ", \DateTime::getLastErrors()["errors"]));
|
||||
|
Loading…
x
Reference in New Issue
Block a user