Updated USersShared
This commit is contained in:
parent
2afeada5d5
commit
fb1be54bb7
1 changed files with 10 additions and 18 deletions
|
@ -6,15 +6,8 @@
|
||||||
|
|
||||||
class UsersShared implements ObjectTypeInterface
|
class UsersShared implements ObjectTypeInterface
|
||||||
{
|
{
|
||||||
/**
|
private int $request_id;
|
||||||
* @var int
|
private int $user_id;
|
||||||
*/
|
|
||||||
private $request_id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var int
|
|
||||||
*/
|
|
||||||
private $user_id;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Identifier of the request
|
* Identifier of the request
|
||||||
|
@ -41,9 +34,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array representation of the object.
|
* @Inh
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
*/
|
||||||
public function toArray(): array
|
public function toArray(): array
|
||||||
{
|
{
|
||||||
|
@ -54,15 +45,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs object from an array representation
|
* @inheritDoc
|
||||||
*
|
|
||||||
* @param array $data
|
|
||||||
* @return UsersShared
|
|
||||||
*/
|
*/
|
||||||
public static function fromArray(array $data): self
|
public static function fromArray(?array $data): ?UsersShared
|
||||||
{
|
{
|
||||||
$object = new self();
|
if($data === null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$object = new self();
|
||||||
$object->request_id = $data['request_id'];
|
$object->request_id = $data['request_id'];
|
||||||
$object->user_id = $data['user_id'];
|
$object->user_id = $data['user_id'];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue