Added php lint checking for travis

This commit is contained in:
laf
2016-08-08 19:53:04 +01:00
parent f1268848b0
commit ec4535dae7
2 changed files with 17 additions and 11 deletions

View File

@@ -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 . -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

View File

@@ -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'];