diff --git a/src/DTO/PasteFormData.php b/src/DTO/PasteFormData.php index f37ddba..d51d25b 100644 --- a/src/DTO/PasteFormData.php +++ b/src/DTO/PasteFormData.php @@ -20,10 +20,15 @@ class PasteFormData public function __construct(?Paste $paste = null) { - if ($paste === null) - { + if ($paste === null) { return; } + + $this->fromPaste($paste); + } + + private function fromPaste(Paste $paste) + { $this->text = $paste->text; $this->private = $paste->secret !== null; $this->language = $paste->language;