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
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
You can’t perform that action at this time.
0 commit comments