PasteFormData->fromPaste private method added
This commit is contained in:
parent
ea7ddcde65
commit
1e02e96eba
|
@ -20,10 +20,15 @@ class PasteFormData
|
||||||
|
|
||||||
public function __construct(?Paste $paste = null)
|
public function __construct(?Paste $paste = null)
|
||||||
{
|
{
|
||||||
if ($paste === null)
|
if ($paste === null) {
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->fromPaste($paste);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function fromPaste(Paste $paste)
|
||||||
|
{
|
||||||
$this->text = $paste->text;
|
$this->text = $paste->text;
|
||||||
$this->private = $paste->secret !== null;
|
$this->private = $paste->secret !== null;
|
||||||
$this->language = $paste->language;
|
$this->language = $paste->language;
|
||||||
|
|
Loading…
Reference in a new issue