mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #4004 from laf/php-lint
Added php lint checking for travis
This commit is contained in:
26
.travis.yml
26
.travis.yml
@ -1,13 +1,19 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- '5.3'
|
||||
- '5.4'
|
||||
- '5.5'
|
||||
- '5.6'
|
||||
- '7.0'
|
||||
- hhvm
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- php: 5.3
|
||||
script: find . -path './lib/influxdb-php' -prune -o -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
- php: 5.4
|
||||
script: find . -path './lib/influxdb-php' -prune -o -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
- php: 5.5
|
||||
script: find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
- php: 5.6
|
||||
script: find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
- php: 7.0
|
||||
script: find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
- php: hhvm
|
||||
script: find . -path './lib/influxdb-php' -prune -o -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | grep -v '^No syntax errors detected' ; test $? -eq 1
|
||||
allow_failures:
|
||||
- php: 7.0
|
||||
- php: 7.0
|
||||
- php: hhvm
|
||||
|
@ -1,3 +1,5 @@
|
||||
[![Build Status](https://scrutinizer-ci.com/g/librenms/librenms/badges/build.png?b=master)](https://scrutinizer-ci.com/g/librenms/librenms/build-status/master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/librenms/librenms/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/librenms/librenms/?branch=master) [![Build Status](https://travis-ci.org/librenms/librenms.svg?branch=master)](https://travis-ci.org/librenms/librenms)
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
// Generate a list of ports and then call the multi_bits grapher to generate from the list
|
||||
$i = 0;
|
||||
foreach (dbFetchRows('SELECT * FROM `ports` WHERE `device_id` = ? AND `pagpGroupIfIndex` = ?', array($port['device_id'], $port['ifIndex'])) as $int) {
|
||||
$rrd_file = get_port_rrdfile_path ($hostname, int['port_id']);
|
||||
$rrd_file = get_port_rrdfile_path ($hostname, $int['port_id']);
|
||||
if (is_file($rrd_file)) {
|
||||
$rrd_list[$i]['filename'] = $rrd_file;
|
||||
$rrd_list[$i]['descr'] = $int['ifDescr'];
|
||||
|
@ -51,7 +51,7 @@ if (!is_dir($pmxcdir)) {
|
||||
dbUpdate(array('device_id' => $device['device_id'], 'app_type' => 'proxmox', 'app_instance' => $pmxcluster), 'applications', '`device_id` = ? AND `app_type` = ?', array($device['device_id'], 'proxmox'));
|
||||
|
||||
if (count($pmxlines) > 0) {
|
||||
$pmxcache = [];
|
||||
$pmxcache = array();
|
||||
|
||||
foreach ($pmxlines as $vm) {
|
||||
list($vmid, $vmport, $vmpin, $vmpout, $vmdesc) = explode('/', $vm, 5);
|
||||
|
@ -53,7 +53,8 @@ if ($agent_data['app']['rrdcached']) {
|
||||
while ($max == -1 || $count < $max) {
|
||||
$data .= fgets($sock, 128);
|
||||
if ($max == -1) {
|
||||
$max = explode(' ', $data)[0] + 1;
|
||||
$tmp_max = explode(' ', $data);
|
||||
$max = $tmp_max[0]+1;
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
|
@ -10,6 +10,6 @@
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$version = $poll_device['sysDescr'];
|
||||
$version = explode(' ', $version)[2];
|
||||
$version = explode(' ', $poll_device['sysDescr']);
|
||||
$version = $version[2];
|
||||
$hardware = snmp_get($device, 'IEEE802dot11-MIB::dot11manufacturerProductName.5', '-Ovq');
|
||||
|
Reference in New Issue
Block a user