@@ -26,8 +26,9 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function __construct(?string $apiMethodName, ?array $params = []) |
28 | 28 | { |
29 | - if (empty($apiMethodName)) |
|
30 | - throw new EmptyApiMethodException(); |
|
29 | + if (empty($apiMethodName)) { |
|
30 | + throw new EmptyApiMethodException(); |
|
31 | + } |
|
31 | 32 | |
32 | 33 | $this->apiMethodName = $apiMethodName; |
33 | 34 | $this->mainElement = new SimpleXMLElement("<$this->apiMethodName></$this->apiMethodName>"); |
@@ -38,8 +39,9 @@ discard block |
||
38 | 39 | |
39 | 40 | private function parseParamsToXml(): void |
40 | 41 | { |
41 | - if (empty($this->params)) |
|
42 | - return; |
|
42 | + if (empty($this->params)) { |
|
43 | + return; |
|
44 | + } |
|
43 | 45 | $this->addParamArrayToElement($this->mainElement, $this->params); |
44 | 46 | } |
45 | 47 |