From fda3ca66955a6add0dccc2d1882ace92b7d010cb Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Thu, 6 Jul 2023 21:48:28 -0500 Subject: [PATCH] Clean up unused code in ValidationException --- lib/Exceptions/ValidationException.php | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/lib/Exceptions/ValidationException.php b/lib/Exceptions/ValidationException.php index 119a1b0e..32b1701a 100644 --- a/lib/Exceptions/ValidationException.php +++ b/lib/Exceptions/ValidationException.php @@ -1,26 +1,19 @@ Add($exception); - } - } - public function __toString(): string{ $output = ''; + foreach($this->Exceptions as $exception){ - $output .= $exception->getMessage() . '; '; + $output .= $exception->getMessage() . "\n"; } - return rtrim($output, '; '); + return rtrim($output); } public function Add(\Exception $exception, bool $isFatal = false): void{ @@ -40,17 +33,6 @@ class ValidationException extends SeException{ $this->HasExceptions = true; } - public function Serialize(): string{ - $val = ''; - foreach($this->Exceptions as $childException){ - $val .= $childException->getCode() . ','; - } - - $val = rtrim($val, ','); - - return $val; - } - public function Has(string $exception): bool{ foreach($this->Exceptions as $childException){ if(is_a($childException, $exception)){