Updated USersShared

This commit is contained in:
netkas 2024-10-06 15:57:07 -04:00
parent 2afeada5d5
commit fb1be54bb7

View file

@ -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'];