| Total Complexity | 7 |
| Total Lines | 76 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class Request |
||
| 18 | { |
||
| 19 | use Jsonc, Payload, Tags, Extras; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | private $server = null; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | private $service = null; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | private $method = null; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Request constructor. |
||
| 38 | * @param string $server |
||
| 39 | * @param string $service |
||
| 40 | * @param string $method |
||
| 41 | */ |
||
| 42 | public function __construct(string $server, string $service, string $method) |
||
| 43 | { |
||
| 44 | $this->server = $server; |
||
| 45 | $this->service = $service; |
||
| 46 | $this->method = $method; |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | public function identify() : string |
||
| 53 | { |
||
| 54 | return "{$this->server()}.{$this->service()}.{$this->method()}"; |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @return string |
||
| 59 | */ |
||
| 60 | public function server() : string |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @return string |
||
| 67 | */ |
||
| 68 | public function service() : string |
||
| 69 | { |
||
| 70 | return $this->service; |
||
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @return string |
||
| 75 | */ |
||
| 76 | public function method() : string |
||
| 79 | } |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @param Message $input |
||
| 83 | * @return Message |
||
| 84 | */ |
||
| 85 | public function struct(Message $input) : Message |
||
| 95 |