File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -11,19 +11,22 @@ class SecretKey extends \PleskX\Api\Operator
11
11
12
12
/**
13
13
* @param string $ipAddress
14
- * @param string $keyDescription
14
+ * @param string $description
15
15
*
16
16
* @return string
17
17
*/
18
- public function create ($ ipAddress = '' , $ keyDescription = '' )
18
+ public function create ($ ipAddress = '' , $ description = '' )
19
19
{
20
20
$ packet = $ this ->_client ->getPacket ();
21
- $ creator = $ packet ->addChild ($ this ->_wrapperTag )->addChild ('create ' );
21
+ $ createTag = $ packet ->addChild ($ this ->_wrapperTag )->addChild ('create ' );
22
22
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 );
25
29
}
26
- $ creator ->addChild ('description ' , $ keyDescription );
27
30
28
31
$ response = $ this ->_client ->request ($ packet );
29
32
You can’t perform that action at this time.
0 commit comments