Major Refactoring
This commit is contained in:
parent
3de87df2d9
commit
54a8a59ee8
83 changed files with 892 additions and 918 deletions
|
@ -111,7 +111,7 @@
|
|||
return [
|
||||
'file_id' => $this->file_id ?? null,
|
||||
'file_unique_id' => $this->file_unique_id ?? null,
|
||||
'thumb' => ($this->thumb instanceof PhotoSize) ? $this->thumb->toArray() : null,
|
||||
'thumb' => ($this->thumb instanceof ObjectTypeInterface) ? $this->thumb->toArray() : null,
|
||||
'file_name' => $this->file_name ?? null,
|
||||
'mime_type' => $this->mime_type ?? null,
|
||||
'file_size' => $this->file_size ?? null,
|
||||
|
@ -127,8 +127,8 @@
|
|||
public static function fromArray(array $data): ObjectTypeInterface
|
||||
{
|
||||
$object = new self();
|
||||
$object->file_id = $data['file_id'];
|
||||
$object->file_unique_id = $data['file_unique_id'];
|
||||
$object->file_id = $data['file_id'] ?? null;
|
||||
$object->file_unique_id = $data['file_unique_id'] ?? null;
|
||||
$object->thumb = isset($data['thumb']) ? PhotoSize::fromArray($data['thumb']) : null;
|
||||
$object->file_name = $data['file_name'] ?? null;
|
||||
$object->mime_type = $data['mime_type'] ?? null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue