| Total Complexity | 2 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | final class Credentials extends \alekciy\ofd\Credentials |
||
| 17 | { |
||
| 18 | /** @var string аутентификационный ключ */ |
||
| 19 | public $authenticationKey = ''; |
||
| 20 | |||
| 21 | /** @var string авторизационный ключ */ |
||
| 22 | public $authorizationKey = ''; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @inheritDoc |
||
| 26 | */ |
||
| 27 | protected function getRuleList(): array |
||
| 28 | { |
||
| 29 | return [ |
||
| 30 | 'authenticationKey' => ['required'], |
||
| 31 | 'authorizationKey' => ['required'], |
||
| 32 | 'domain' => ['required', ['in', ['api.ofd.yandex.net']]], |
||
| 33 | ]; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param string $domain Имя домена на котором находится API (api.ofd.yandex.net промышленный). |
||
| 38 | * @param string $authenticationKey Аутентификационный ключ. |
||
| 39 | * @param string $authorizationKey Авторизационный ключ. |
||
| 40 | * @throws Exception |
||
| 41 | */ |
||
| 42 | public function __construct(string $domain, string $authenticationKey, string $authorizationKey) |
||
| 48 | } |
||
| 49 | } |
||
| 50 |