Skip to content

Commit c9de9a6

Browse files
committed
Style fixes
1 parent 9be3148 commit c9de9a6

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/Api/Operator/SecretKey.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,22 @@ class SecretKey extends \PleskX\Api\Operator
1111

1212
/**
1313
* @param string $ipAddress
14-
* @param string $keyDescription
14+
* @param string $description
1515
*
1616
* @return string
1717
*/
18-
public function create($ipAddress = '', $keyDescription = '')
18+
public function create($ipAddress = '', $description = '')
1919
{
2020
$packet = $this->_client->getPacket();
21-
$creator = $packet->addChild($this->_wrapperTag)->addChild('create');
21+
$createTag = $packet->addChild($this->_wrapperTag)->addChild('create');
2222

23-
if ($ipAddress != '') {
24-
$creator->addChild('ip_address', $ipAddress);
23+
if ('' !== $ipAddress) {
24+
$createTag->addChild('ip_address', $ipAddress);
25+
}
26+
27+
if ('' !== $description) {
28+
$createTag->addChild('description', $description);
2529
}
26-
$creator->addChild('description', $keyDescription);
2730

2831
$response = $this->_client->request($packet);
2932

0 commit comments

Comments
 (0)