@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | |
156 | 156 | if ('sdk' == $this->_protocol) { |
157 | 157 | $version = ('' == $this->_version) ? null : $this->_version; |
158 | - $requestXml = new SimpleXMLElement((string) $request); |
|
158 | + $requestXml = new SimpleXMLElement((string)$request); |
|
159 | 159 | $xml = \pm_ApiRpc::getService($version)->call($requestXml->children()[0]->asXml(), $this->_login); |
160 | 160 | } else { |
161 | 161 | $xml = $this->_performHttpRequest($request); |
@@ -282,13 +282,13 @@ discard block |
||
282 | 282 | */ |
283 | 283 | protected function _verifyResponse($xml) |
284 | 284 | { |
285 | - if ($xml->system && $xml->system->status && 'error' == (string) $xml->system->status) { |
|
286 | - throw new Exception((string) $xml->system->errtext, (int) $xml->system->errcode); |
|
285 | + if ($xml->system && $xml->system->status && 'error' == (string)$xml->system->status) { |
|
286 | + throw new Exception((string)$xml->system->errtext, (int)$xml->system->errcode); |
|
287 | 287 | } |
288 | 288 | |
289 | 289 | if ($xml->xpath('//status[text()="error"]') && $xml->xpath('//errcode') && $xml->xpath('//errtext')) { |
290 | - $errorCode = (int) $xml->xpath('//errcode')[0]; |
|
291 | - $errorMessage = (string) $xml->xpath('//errtext')[0]; |
|
290 | + $errorCode = (int)$xml->xpath('//errcode')[0]; |
|
291 | + $errorMessage = (string)$xml->xpath('//errtext')[0]; |
|
292 | 292 | |
293 | 293 | throw new Exception($errorMessage, $errorCode); |
294 | 294 | } |
@@ -18,6 +18,6 @@ |
||
18 | 18 | */ |
19 | 19 | public function getValue($node) |
20 | 20 | { |
21 | - return (string) $this->xpath('//'.$node)[0]; |
|
21 | + return (string)$this->xpath('//'.$node)[0]; |
|
22 | 22 | } |
23 | 23 | } |
@@ -45,6 +45,6 @@ |
||
45 | 45 | */ |
46 | 46 | public function getLastId() |
47 | 47 | { |
48 | - return (int) $this->request('get-last-id')->getValue('id'); |
|
48 | + return (int)$this->request('get-last-id')->getValue('id'); |
|
49 | 49 | } |
50 | 50 | } |
@@ -52,6 +52,6 @@ |
||
52 | 52 | $filter->addChild($field, $value); |
53 | 53 | $response = $this->_client->request($packet); |
54 | 54 | |
55 | - return 'ok' === (string) $response->status; |
|
55 | + return 'ok' === (string)$response->status; |
|
56 | 56 | } |
57 | 57 | } |
@@ -75,7 +75,7 @@ |
||
75 | 75 | */ |
76 | 76 | public function getHosting($field, $value) |
77 | 77 | { |
78 | - $items = $this->_getItems(Struct\HostingInfo::class, 'hosting', $field, $value, function ($node) { |
|
78 | + $items = $this->_getItems(Struct\HostingInfo::class, 'hosting', $field, $value, function($node) { |
|
79 | 79 | return isset($node->vrt_hst); |
80 | 80 | }); |
81 | 81 |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $response = $this->request('get'); |
18 | 18 | |
19 | 19 | foreach ($response->session as $sessionInfo) { |
20 | - $sessions[(string) $sessionInfo->id] = new Struct\Info($sessionInfo); |
|
20 | + $sessions[(string)$sessionInfo->id] = new Struct\Info($sessionInfo); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | return $sessions; |
@@ -32,6 +32,6 @@ discard block |
||
32 | 32 | { |
33 | 33 | $response = $this->request("terminate.session-id=$sessionId"); |
34 | 34 | |
35 | - return 'ok' === (string) $response->status; |
|
35 | + return 'ok' === (string)$response->status; |
|
36 | 36 | } |
37 | 37 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); |
27 | 27 | |
28 | 28 | foreach ($response->locale->get->result as $localeInfo) { |
29 | - $locales[(string) $localeInfo->info->id] = new Struct\Info($localeInfo->info); |
|
29 | + $locales[(string)$localeInfo->info->id] = new Struct\Info($localeInfo->info); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | return !is_null($id) ? reset($locales) : $locales; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | { |
18 | 18 | $response = $this->request('get-supported-types'); |
19 | 19 | |
20 | - return (array) $response->type; |
|
20 | + return (array)$response->type; |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $items = []; |
63 | 63 | foreach ($response->xpath('//result') as $xmlResult) { |
64 | 64 | $item = new Struct\Info($xmlResult->data); |
65 | - $item->id = (int) $xmlResult->id; |
|
65 | + $item->id = (int)$xmlResult->id; |
|
66 | 66 | $items[] = $item; |
67 | 67 | } |
68 | 68 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | |
38 | 38 | $response = $this->_client->request($packet); |
39 | 39 | |
40 | - return (int) $response->id; |
|
40 | + return (int)$response->id; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |