phpstan
This commit is contained in:
parent
8a20b86b17
commit
4b5041b05b
@ -24,6 +24,7 @@ use RetailCrm\Mg\Bot\Model\Entity\Message\Message;
|
|||||||
use RetailCrm\Mg\Bot\Model\Entity\Template\Template;
|
use RetailCrm\Mg\Bot\Model\Entity\Template\Template;
|
||||||
use RetailCrm\Mg\Bot\Model\Entity\User;
|
use RetailCrm\Mg\Bot\Model\Entity\User;
|
||||||
use RetailCrm\Mg\Bot\Model\ModelAdapter;
|
use RetailCrm\Mg\Bot\Model\ModelAdapter;
|
||||||
|
use RetailCrm\Mg\Bot\Model\ModelInterface;
|
||||||
use RetailCrm\Mg\Bot\Model\Request\UploadFileByUrlRequest;
|
use RetailCrm\Mg\Bot\Model\Request\UploadFileByUrlRequest;
|
||||||
use RetailCrm\Mg\Bot\Model\Response\AssignResponse;
|
use RetailCrm\Mg\Bot\Model\Response\AssignResponse;
|
||||||
use RetailCrm\Mg\Bot\Model\Response\ErrorOnlyResponse;
|
use RetailCrm\Mg\Bot\Model\Response\ErrorOnlyResponse;
|
||||||
@ -465,10 +466,10 @@ class Client
|
|||||||
/**
|
/**
|
||||||
* Returns templates list
|
* Returns templates list
|
||||||
*
|
*
|
||||||
* @return array
|
* @return Template[]
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function templates()
|
public function templates(): array
|
||||||
{
|
{
|
||||||
$response = $this->client->makeRequest(
|
$response = $this->client->makeRequest(
|
||||||
'/templates',
|
'/templates',
|
||||||
@ -480,7 +481,7 @@ class Client
|
|||||||
return $adapter->getResponseList($response);
|
return $adapter->getResponseList($response);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function templateSend(string $templateId, Model\Request\TemplateSendRequest $request)
|
public function templateSend(string $templateId, Model\Request\TemplateSendRequest $request): ModelInterface
|
||||||
{
|
{
|
||||||
$response = $this->client->makeRequest(
|
$response = $this->client->makeRequest(
|
||||||
sprintf('/templates/%d/send', $templateId),
|
sprintf('/templates/%d/send', $templateId),
|
||||||
|
@ -72,7 +72,7 @@ class Template implements ModelInterface
|
|||||||
private $type;
|
private $type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array $template
|
* @var array<string, string> $template
|
||||||
*
|
*
|
||||||
* @Type("array")
|
* @Type("array")
|
||||||
* @Accessor(getter="getTemplate",setter="setTemplate")
|
* @Accessor(getter="getTemplate",setter="setTemplate")
|
||||||
@ -129,7 +129,7 @@ class Template implements ModelInterface
|
|||||||
private $quality;
|
private $quality;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array $header
|
* @var array<string, string> $header
|
||||||
*
|
*
|
||||||
* @Type("array")
|
* @Type("array")
|
||||||
* @Accessor(getter="getHeader",setter="setHeader")
|
* @Accessor(getter="getHeader",setter="setHeader")
|
||||||
@ -138,7 +138,7 @@ class Template implements ModelInterface
|
|||||||
private $header;
|
private $header;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array $header
|
* @var array<string, array<string, string>> $buttons
|
||||||
*
|
*
|
||||||
* @Type("array")
|
* @Type("array")
|
||||||
* @Accessor(getter="getButtons",setter="setButtons")
|
* @Accessor(getter="getButtons",setter="setButtons")
|
||||||
@ -243,7 +243,7 @@ class Template implements ModelInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array|null
|
* @return array<string, string>|null
|
||||||
*/
|
*/
|
||||||
public function getTemplate(): ?array
|
public function getTemplate(): ?array
|
||||||
{
|
{
|
||||||
@ -251,9 +251,9 @@ class Template implements ModelInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param mixed $template
|
* @param array<string, string> $template
|
||||||
*/
|
*/
|
||||||
public function setTemplate($template): void
|
public function setTemplate(array $template): void
|
||||||
{
|
{
|
||||||
$this->template = $template;
|
$this->template = $template;
|
||||||
}
|
}
|
||||||
@ -352,7 +352,7 @@ class Template implements ModelInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array|null
|
* @return array<string, string>|null
|
||||||
*/
|
*/
|
||||||
public function getHeader(): ?array
|
public function getHeader(): ?array
|
||||||
{
|
{
|
||||||
@ -360,7 +360,7 @@ class Template implements ModelInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $header
|
* @param array<string, string> $header
|
||||||
*/
|
*/
|
||||||
public function setHeader(array $header): void
|
public function setHeader(array $header): void
|
||||||
{
|
{
|
||||||
@ -368,7 +368,7 @@ class Template implements ModelInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array|null
|
* @return array<string, array<string, string>>|null
|
||||||
*/
|
*/
|
||||||
public function getButtons(): ?array
|
public function getButtons(): ?array
|
||||||
{
|
{
|
||||||
@ -376,7 +376,7 @@ class Template implements ModelInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $buttons
|
* @param array<string, array<string, string>> $buttons
|
||||||
*/
|
*/
|
||||||
public function setButtons(array $buttons): void
|
public function setButtons(array $buttons): void
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ use RetailCrm\Mg\Bot\Model\ModelInterface;
|
|||||||
class TemplateVariables implements ModelInterface
|
class TemplateVariables implements ModelInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var array $header
|
* @var array<string, string> $header
|
||||||
*
|
*
|
||||||
* @Type("array")
|
* @Type("array")
|
||||||
* @Accessor(getter="getHeader",setter="setHeader")
|
* @Accessor(getter="getHeader",setter="setHeader")
|
||||||
@ -23,7 +23,7 @@ class TemplateVariables implements ModelInterface
|
|||||||
private $header;
|
private $header;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array $body
|
* @var array<string, string> $body
|
||||||
*
|
*
|
||||||
* @Type("array")
|
* @Type("array")
|
||||||
* @Accessor(getter="getBody",setter="setBody")
|
* @Accessor(getter="getBody",setter="setBody")
|
||||||
@ -31,7 +31,7 @@ class TemplateVariables implements ModelInterface
|
|||||||
private $body;
|
private $body;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array<array> $buttons
|
* @var array<string, array<string, string>> $buttons
|
||||||
*
|
*
|
||||||
* @Type("array")
|
* @Type("array")
|
||||||
* @Accessor(getter="getButtons",setter="setButtons")
|
* @Accessor(getter="getButtons",setter="setButtons")
|
||||||
@ -39,7 +39,7 @@ class TemplateVariables implements ModelInterface
|
|||||||
private $buttons;
|
private $buttons;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array|null
|
* @return array<string, string>|null
|
||||||
*/
|
*/
|
||||||
public function getHeader(): ?array
|
public function getHeader(): ?array
|
||||||
{
|
{
|
||||||
@ -47,7 +47,7 @@ class TemplateVariables implements ModelInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $header
|
* @param array<string, string> $header
|
||||||
*/
|
*/
|
||||||
public function setHeader(array $header): void
|
public function setHeader(array $header): void
|
||||||
{
|
{
|
||||||
@ -55,7 +55,7 @@ class TemplateVariables implements ModelInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array|null
|
* @return array<string, string>|null
|
||||||
*/
|
*/
|
||||||
public function getBody(): ?array
|
public function getBody(): ?array
|
||||||
{
|
{
|
||||||
@ -63,7 +63,7 @@ class TemplateVariables implements ModelInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $body
|
* @param array<string, string> $body
|
||||||
*/
|
*/
|
||||||
public function setBody(array $body): void
|
public function setBody(array $body): void
|
||||||
{
|
{
|
||||||
@ -71,7 +71,7 @@ class TemplateVariables implements ModelInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array[]|null
|
* @return array<string, array<string, string>>|null
|
||||||
*/
|
*/
|
||||||
public function getButtons(): ?array
|
public function getButtons(): ?array
|
||||||
{
|
{
|
||||||
@ -79,7 +79,7 @@ class TemplateVariables implements ModelInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array[] $buttons
|
* @param array<string, array<string, string>> $buttons
|
||||||
*/
|
*/
|
||||||
public function setButtons(array $buttons): void
|
public function setButtons(array $buttons): void
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user