From 15425d01bc8900d475c5ebbdd53e84ce76178c84 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 28 Jan 2022 21:53:28 +0000 Subject: [PATCH] BanEntry: clean up getString() --- src/permission/BanEntry.php | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/permission/BanEntry.php b/src/permission/BanEntry.php index d0d200eac5..47c8f6e039 100644 --- a/src/permission/BanEntry.php +++ b/src/permission/BanEntry.php @@ -107,18 +107,13 @@ class BanEntry{ } public function getString() : string{ - $str = ""; - $str .= $this->getName(); - $str .= "|"; - $str .= $this->getCreated()->format(self::$format); - $str .= "|"; - $str .= $this->getSource(); - $str .= "|"; - $str .= $this->getExpires() === null ? "Forever" : $this->getExpires()->format(self::$format); - $str .= "|"; - $str .= $this->getReason(); - - return $str; + return implode("|", [ + $this->getName(), + $this->getCreated()->format(self::$format), + $this->getSource(), + $this->getExpires() === null ? "Forever" : $this->getExpires()->format(self::$format), + $this->getReason() + ]); } /**