1
0
mirror of synced 2024-11-25 13:16:01 +03:00

[fix] nullable types to avoid exceptions when properties is not set

This commit is contained in:
Pavel 2019-10-07 09:09:49 +03:00
parent 5f6179ea1c
commit e111b8d882
13 changed files with 57 additions and 57 deletions

View File

@ -120,9 +120,9 @@ class Chat implements ModelInterface
private $lastActivity;
/**
* @return string
* @return string|null
*/
public function getId(): string
public function getId(): ?string
{
return $this->id;
}

View File

@ -56,9 +56,9 @@ class ChatLastMessage implements ModelInterface
private $type;
/**
* @return int
* @return int|null
*/
public function getId(): int
public function getId(): ?int
{
return $this->id;
}

View File

@ -90,9 +90,9 @@ class ChatMember implements ModelInterface
private $state;
/**
* @return string
* @return string|null
*/
public function getId(): string
public function getId(): ?string
{
return $this->id;
}

View File

@ -58,7 +58,7 @@ class Item implements ModelInterface
/**
* @return string
*/
public function getId()
public function getId(): ?string
{
return $this->id;
}

View File

@ -209,9 +209,9 @@ class Message implements ModelInterface
private $product;
/**
* @return string
* @return string|null
*/
public function getId(): string
public function getId(): ?string
{
return $this->id;
}
@ -257,9 +257,9 @@ class Message implements ModelInterface
}
/**
* @return string
* @return string|null
*/
public function getActions(): string
public function getActions(): ?string
{
return $this->actions;
}

View File

@ -92,9 +92,9 @@ class MessageProduct implements ModelInterface
private $quantity;
/**
* @return int
* @return int|null
*/
public function getId(): int
public function getId(): ?int
{
return $this->id;
}

View File

@ -55,9 +55,9 @@ trait CommonFields
private $until;
/**
* @return int
* @return int|null
*/
public function getId()
public function getId(): ?int
{
return $this->id;
}

View File

@ -47,9 +47,9 @@ class MessageEditRequest implements ModelInterface
private $content;
/**
* @return int
* @return int|null
*/
public function getId()
public function getId(): ?int
{
return $this->id;
}

View File

@ -68,9 +68,9 @@ class AssignResponse implements ModelInterface
private $responsible;
/**
* @return bool
* @return bool|null
*/
public function getIsReassign(): bool
public function getIsReassign(): ?bool
{
return $this->isReassign;
}
@ -84,9 +84,9 @@ class AssignResponse implements ModelInterface
}
/**
* @return int
* @return int|null
*/
public function getLeftManagerId(): int
public function getLeftManagerId(): ?int
{
return $this->leftManagerId;
}
@ -100,9 +100,9 @@ class AssignResponse implements ModelInterface
}
/**
* @return Responsible
* @return Responsible|null
*/
public function getPreviousResponsible(): Responsible
public function getPreviousResponsible(): ?Responsible
{
return $this->previousResponsible;
}
@ -116,9 +116,9 @@ class AssignResponse implements ModelInterface
}
/**
* @return Responsible
* @return Responsible|null
*/
public function getResponsible(): Responsible
public function getResponsible(): ?Responsible
{
return $this->responsible;
}

View File

@ -44,9 +44,9 @@ trait CommonFields
private $statusCode;
/**
* @return array
* @return array|null
*/
public function getErrors(): array
public function getErrors(): ?array
{
return empty($this->errors) ? [] : $this->errors;
}
@ -60,9 +60,9 @@ trait CommonFields
}
/**
* @return int
* @return int|null
*/
public function getStatusCode(): int
public function getStatusCode(): ?int
{
return $this->statusCode;
}

View File

@ -67,9 +67,9 @@ class FullFileResponse implements ModelInterface
private $url;
/**
* @return string
* @return string|null
*/
public function getId(): string
public function getId(): ?string
{
return $this->id;
}
@ -83,9 +83,9 @@ class FullFileResponse implements ModelInterface
}
/**
* @return int
* @return int|null
*/
public function getSize(): int
public function getSize(): ?int
{
return $this->size;
}
@ -99,9 +99,9 @@ class FullFileResponse implements ModelInterface
}
/**
* @return string
* @return string|null
*/
public function getType(): string
public function getType(): ?string
{
return $this->type;
}
@ -115,9 +115,9 @@ class FullFileResponse implements ModelInterface
}
/**
* @return string
* @return string|null
*/
public function getUrl(): string
public function getUrl(): ?string
{
return $this->url;
}

View File

@ -49,9 +49,9 @@ class MessageSendResponse implements ModelInterface
private $time;
/**
* @return int
* @return int|null
*/
public function getMessageId(): int
public function getMessageId(): ?int
{
return $this->messageId;
}
@ -65,9 +65,9 @@ class MessageSendResponse implements ModelInterface
}
/**
* @return string
* @return string|null
*/
public function getTime(): string
public function getTime(): ?string
{
return $this->time;
}

View File

@ -104,9 +104,9 @@ class UploadFileResponse implements ModelInterface
private $type;
/**
* @return string
* @return string|null
*/
public function getCreatedAt(): string
public function getCreatedAt(): ?string
{
return $this->createdAt;
}
@ -120,9 +120,9 @@ class UploadFileResponse implements ModelInterface
}
/**
* @return string
* @return string|null
*/
public function getHash(): string
public function getHash(): ?string
{
return $this->hash;
}
@ -136,9 +136,9 @@ class UploadFileResponse implements ModelInterface
}
/**
* @return string
* @return string|null
*/
public function getId(): string
public function getId(): ?string
{
return $this->id;
}
@ -152,9 +152,9 @@ class UploadFileResponse implements ModelInterface
}
/**
* @return FileMeta
* @return FileMeta|null
*/
public function getMeta(): FileMeta
public function getMeta(): ?FileMeta
{
return $this->meta;
}
@ -168,9 +168,9 @@ class UploadFileResponse implements ModelInterface
}
/**
* @return string
* @return string|null
*/
public function getMimeType(): string
public function getMimeType(): ?string
{
return $this->mimeType;
}
@ -184,9 +184,9 @@ class UploadFileResponse implements ModelInterface
}
/**
* @return int
* @return int|null
*/
public function getSize(): int
public function getSize(): ?int
{
return $this->size;
}
@ -200,9 +200,9 @@ class UploadFileResponse implements ModelInterface
}
/**
* @return string
* @return string|null
*/
public function getSourceUrl(): string
public function getSourceUrl(): ?string
{
return $this->sourceUrl;
}
@ -216,9 +216,9 @@ class UploadFileResponse implements ModelInterface
}
/**
* @return string
* @return string|null
*/
public function getType(): string
public function getType(): ?string
{
return $this->type;
}