Skip to content

Commit 3ad2a09

Browse files
author
Nathan Sullivan
committed
fixed shitty formatting/coding standards and parse error
1 parent 6359678 commit 3ad2a09

File tree

1 file changed

+34
-38
lines changed

1 file changed

+34
-38
lines changed

pve2_api.class.php

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ private function pve_action ($action_path, $http_method, $put_post_parameters =
304304
}
305305

306306
/*
307-
* array get_node_list ()
307+
* array reload_node_list ()
308308
* Returns the list of node names as provided by /api2/json/nodes.
309309
* We need this for future get/post/put/delete calls.
310310
* ie. $this->get("nodes/XXX/status"); where XXX is one of the values from this return array.
@@ -330,6 +330,10 @@ public function reload_node_list () {
330330
}
331331
}
332332

333+
/*
334+
* array get_node_list ()
335+
*
336+
*/
333337
public function get_node_list () {
334338
# We run this if we haven't queried for cluster nodes as yet, and cache it in the object.
335339
if ($this->pve_cluster_node_list == null) {
@@ -343,45 +347,37 @@ public function get_node_list () {
343347

344348

345349
/*
346-
Get Last VMID from a Cluster or a Node
347-
348-
return an VMID
349-
*/
350-
351-
public function get_next_vmid() {
352-
if (!$this->constructor_success) {
353-
return false;
354-
}
355-
$vmid = $this->pve_action("/cluster/nextid","GET");
356-
if ($vmid == null)
357-
{
358-
return false;
359-
}else {
360-
return $vmid;
361-
}
350+
* bool|int get_next_vmid ()
351+
* Get Last VMID from a Cluster or a Node
352+
* returns a VMID, or false if not found.
353+
*/
354+
public function get_next_vmid () {
355+
if (!$this->constructor_success) {
356+
return false;
357+
}
358+
$vmid = $this->pve_action("/cluster/nextid","GET");
359+
if ($vmid == null) {
360+
return false;
361+
} else {
362+
return $vmid;
363+
}
364+
}
362365

363366
/*
364-
Return the version and minor revision of Proxmox Server
365-
*/
366-
367-
368-
public function get_version() {
369-
if (!$this->constructor_success) {
370-
return false;
371-
}
372-
$version = $this->pve_action("/version","GET");
373-
if ($version == null)
374-
{
375-
return false;
376-
}else {
377-
return $version['version'];
378-
}
379-
380-
381-
}
382-
383-
384-
367+
* bool|string get_version ()
368+
* Return the version and minor revision of Proxmox Server
369+
*/
370+
public function get_version () {
371+
if (!$this->constructor_success) {
372+
return false;
373+
}
374+
$version = $this->pve_action("/version","GET");
375+
if ($version == null) {
376+
return false;
377+
} else {
378+
return $version['version'];
379+
}
380+
}
385381

386382
/*
387383
* object/array? get (string action_path)

0 commit comments

Comments
 (0)