@@ -29,8 +29,9 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public function __construct(?string $apiMethodName, ?array $params = [], ?int $user_id = null, ?int $order_id = null) |
31 | 31 | { |
32 | - if (empty($apiMethodName)) |
|
33 | - throw new EmptyApiMethodException(); |
|
32 | + if (empty($apiMethodName)) { |
|
33 | + throw new EmptyApiMethodException(); |
|
34 | + } |
|
34 | 35 | |
35 | 36 | $this->apiMethodName = $apiMethodName; |
36 | 37 | $this->mainElement = new SimpleXMLElement("<$this->apiMethodName></$this->apiMethodName>"); |
@@ -43,8 +44,9 @@ discard block |
||
43 | 44 | |
44 | 45 | private function parseParamsToXml(): void |
45 | 46 | { |
46 | - if (empty($this->params)) |
|
47 | - return; |
|
47 | + if (empty($this->params)) { |
|
48 | + return; |
|
49 | + } |
|
48 | 50 | $this->addParamArrayToElement($this->mainElement, $this->params); |
49 | 51 | } |
50 | 52 |