| Total Complexity | 4 | 
| Total Lines | 55 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 9 | abstract class GetMessageRequest  | 
            ||
| 10 | { | 
            ||
| 11 | private $messageId;  | 
            ||
| 12 | protected $client;  | 
            ||
| 13 | |||
| 14 | const PROCESSING = 'PROCESSING';  | 
            ||
| 15 | const COMPLETED = 'COMPLETED';  | 
            ||
| 16 | |||
| 17 | /**  | 
            ||
| 18 | * Check response status is Completed  | 
            ||
| 19 | * @param $response  | 
            ||
| 20 | * @return bool  | 
            ||
| 21 | */  | 
            ||
| 22 | protected function isCompleted($response) : bool  | 
            ||
| 23 |     { | 
            ||
| 24 | return $response->ProcessingStatus === self::COMPLETED;  | 
            ||
| 25 | }  | 
            ||
| 26 | |||
| 27 | /**  | 
            ||
| 28 | * Return array xml with parameter MessageId  | 
            ||
| 29 | * @return array  | 
            ||
| 30 | */  | 
            ||
| 31 | protected function getXml() : array  | 
            ||
| 32 |     { | 
            ||
| 33 | return [['MessageId' => $this->messageId]];  | 
            ||
| 34 | }  | 
            ||
| 35 | |||
| 36 | /**  | 
            ||
| 37 | * @param string $messageId  | 
            ||
| 38 | */  | 
            ||
| 39 | public function setMessageId(string $messageId): void  | 
            ||
| 42 | }  | 
            ||
| 43 | |||
| 44 | public function setClient(ClientSoap $clientSoap)  | 
            ||
| 47 | }  | 
            ||
| 48 | |||
| 49 | abstract public function send();  | 
            ||
| 50 | |||
| 51 | /**  | 
            ||
| 52 | * Get message type:CheckTicket or GetTicket  | 
            ||
| 53 | * @return string  | 
            ||
| 54 | */  | 
            ||
| 55 | abstract public function getTypeMessage() : string;  | 
            ||
| 56 | |||
| 57 | /**  | 
            ||
| 58 | * Get class child SimpleXMLElement for handler response  | 
            ||
| 59 | * @return string  | 
            ||
| 60 | */  | 
            ||
| 61 | abstract public function getXmlResponseClass() : string;  | 
            ||
| 62 | |||
| 63 | abstract public function getResponse() : ResponseSendMessage;  | 
            ||
| 64 | }  | 
            ||
| 65 |