@@ -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 |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | */ |
| 68 | 68 | public function getHosting($field, $value) |
| 69 | 69 | { |
| 70 | - $items = $this->_getItems(Struct\HostingInfo::class, 'hosting', $field, $value, function ($node) { |
|
| 70 | + $items = $this->_getItems(Struct\HostingInfo::class, 'hosting', $field, $value, function($node) { |
|
| 71 | 71 | return isset($node->vrt_hst); |
| 72 | 72 | }); |
| 73 | 73 | return empty($items) ? null : reset($items); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | { |
| 127 | 127 | $protocolVersion = !is_null($version) ? $version : $this->_version; |
| 128 | 128 | $content = "<?xml version='1.0' encoding='UTF-8' ?>"; |
| 129 | - $content .= "<packet" . ("" === $protocolVersion ? "" : " version='$protocolVersion'") . "/>"; |
|
| 129 | + $content .= "<packet".("" === $protocolVersion ? "" : " version='$protocolVersion'")."/>"; |
|
| 130 | 130 | return new SimpleXMLElement($content); |
| 131 | 131 | } |
| 132 | 132 | |
@@ -345,11 +345,11 @@ discard block |
||
| 345 | 345 | { |
| 346 | 346 | foreach ($array as $key => $value) { |
| 347 | 347 | if (is_array($value)) { |
| 348 | - if ($this->_isAssoc($value)){ //assoc |
|
| 348 | + if ($this->_isAssoc($value)) { //assoc |
|
| 349 | 349 | $this->_arrayToXml($value, $xml->addChild($key)); |
| 350 | 350 | } |
| 351 | - else{ //indexed |
|
| 352 | - foreach ($value as $sub_value){ |
|
| 351 | + else { //indexed |
|
| 352 | + foreach ($value as $sub_value) { |
|
| 353 | 353 | $xml->addChild($key, $sub_value); |
| 354 | 354 | } |
| 355 | 355 | } |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | protected function _getOperator($name) |
| 375 | 375 | { |
| 376 | 376 | if (!isset($this->_operatorsCache[$name])) { |
| 377 | - $className = '\\PleskX\\Api\\Operator\\' . $name; |
|
| 377 | + $className = '\\PleskX\\Api\\Operator\\'.$name; |
|
| 378 | 378 | $this->_operatorsCache[$name] = new $className($this); |
| 379 | 379 | } |
| 380 | 380 | |