PSR2 Cleanup: /html edition

Travis tests for code conformance. Ignore warnings for now.
Fixed all errors, left most warnings.
This commit is contained in:
Tony Murray
2016-08-18 20:28:22 -05:00
parent f0c82498b5
commit 8c639aa5a4
468 changed files with 6605 additions and 7629 deletions

View File

@@ -21,7 +21,8 @@
* @param string $c Clustername
* @return array An array with all the VM's on this cluster
*/
function proxmox_cluster_vms($c) {
function proxmox_cluster_vms($c)
{
return dbFetchRows("SELECT * FROM proxmox WHERE cluster = ? ORDER BY vmid", array($c));
}
@@ -30,7 +31,8 @@ function proxmox_cluster_vms($c) {
* @param integer $n device_id
* @return array An array with all the VM's on this node
*/
function proxmox_node_vms($n) {
function proxmox_node_vms($n)
{
return dbFetchRows("SELECT * FROM proxmox WHERE device_id = ? ORDER BY vmid", array($n));
}
@@ -40,7 +42,8 @@ function proxmox_node_vms($n) {
* @param string $c Clustername
* @return array An array with all info of this VM on this cluster, including ports
*/
function proxmox_vm_info($vmid, $c) {
function proxmox_vm_info($vmid, $c)
{
$vm = dbFetchRow("SELECT pm.*, d.hostname AS host, d.device_id FROM proxmox pm, devices d WHERE pm.device_id = d.device_id AND pm.vmid = ? AND pm.cluster = ?", array($vmid, $c));
$appid = dbFetchRow("SELECT app_id FROM applications WHERE device_id = ? AND app_type = ?", array($vm['device_id'], 'proxmox'));