Lines
100.00%
1 / 1
Functions and Methods
100.00%
1 / 1
Classes and Traits
100.00%
1 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Authenticate | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 2 | 100.00% | 1 / 1 | |||
| __construct | n/a | 0 / 0 | n/a | 0 / 0 | 1 | |||||
| toMessage | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Stewart\Client\Connection\Command; | |
| 6 | ||
| 7 | use SensitiveParameter; | |
| 8 | ||
| 9 | final readonly class Authenticate | |
| 10 | { | |
| 11 | public function __construct(#[SensitiveParameter] private string $accessToken) {} | |
| 12 | ||
| 13 | /** @return array<string, string> */ | |
| 14 | public function toMessage(): array | |
| 15 | { | |
| 16 | return ['type' => 'auth', 'access_token' => $this->accessToken]; | |
| 17 | } | |
| 18 | } |