@@ -94,7 +94,7 @@ |
||
| 94 | 94 | /** |
| 95 | 95 | * Retrieve name of the protocol (http or https) used for communication |
| 96 | 96 | * |
| 97 | - * @return int |
|
| 97 | + * @return string |
|
| 98 | 98 | */ |
| 99 | 99 | public function getProtocol() |
| 100 | 100 | { |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | { |
| 112 | 112 | $protocolVersion = !is_null($version) ? $version : $this->_version; |
| 113 | 113 | $content = "<?xml version='1.0' encoding='UTF-8' ?>"; |
| 114 | - $content .= "<packet" . ("" === $protocolVersion ? "" : " version='$protocolVersion'") . "/>"; |
|
| 114 | + $content .= "<packet".("" === $protocolVersion ? "" : " version='$protocolVersion'")."/>"; |
|
| 115 | 115 | return new SimpleXMLElement($content); |
| 116 | 116 | } |
| 117 | 117 | |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | protected function _getOperator($name) |
| 334 | 334 | { |
| 335 | 335 | if (!isset($this->_operatorsCache[$name])) { |
| 336 | - $className = '\\PleskX\\Api\\Operator\\' . $name; |
|
| 336 | + $className = '\\PleskX\\Api\\Operator\\'.$name; |
|
| 337 | 337 | $this->_operatorsCache[$name] = new $className($this); |
| 338 | 338 | } |
| 339 | 339 | |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | */ |
| 56 | 56 | private function _underToCamel($under) |
| 57 | 57 | { |
| 58 | - $under = '_' . str_replace('_', ' ', strtolower($under)); |
|
| 58 | + $under = '_'.str_replace('_', ' ', strtolower($under)); |
|
| 59 | 59 | return ltrim(str_replace(' ', '', ucwords($under)), '_'); |
| 60 | 60 | } |
| 61 | 61 | |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | public function getValue($node) |
| 19 | 19 | { |
| 20 | - return (string)$this->xpath('//' . $node)[0]; |
|
| 20 | + return (string)$this->xpath('//'.$node)[0]; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | } |
| 24 | 24 | \ No newline at end of file |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | $info_props = $info->addChild('hosting')->addChild('vrt_hst'); |
| 48 | 48 | |
| 49 | - if($ftp_login != "" && $ftp_pass != "") |
|
| 49 | + if ($ftp_login != "" && $ftp_pass != "") |
|
| 50 | 50 | { |
| 51 | 51 | $prop_ftp_user = $info_props->addChild('property'); |
| 52 | 52 | $prop_ftp_user->addChild("name", 'ftp_login'); |
@@ -58,10 +58,10 @@ discard block |
||
| 58 | 58 | $prop_ftp_pass->addChild("value", $ftp_pass); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - if($ip != "") |
|
| 61 | + if ($ip != "") |
|
| 62 | 62 | $info_props->addChild("ip_address", $ip); |
| 63 | 63 | |
| 64 | - if($more_prop) |
|
| 64 | + if ($more_prop) |
|
| 65 | 65 | foreach ($more_prop as $name => $value) |
| 66 | 66 | $info->addChild($name, $value); |
| 67 | 67 | |
@@ -58,12 +58,14 @@ |
||
| 58 | 58 | $prop_ftp_pass->addChild("value", $ftp_pass); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - if($ip != "") |
|
| 62 | - $info_props->addChild("ip_address", $ip); |
|
| 61 | + if($ip != "") { |
|
| 62 | + $info_props->addChild("ip_address", $ip); |
|
| 63 | + } |
|
| 63 | 64 | |
| 64 | - if($more_prop) |
|
| 65 | - foreach ($more_prop as $name => $value) |
|
| 65 | + if($more_prop) { |
|
| 66 | + foreach ($more_prop as $name => $value) |
|
| 66 | 67 | $info->addChild($name, $value); |
| 68 | + } |
|
| 67 | 69 | |
| 68 | 70 | $response = $this->_client->request($packet); |
| 69 | 71 | return new Struct\Info($response); |