summaryrefslogtreecommitdiff
path: root/it_pipe.class
diff options
context:
space:
mode:
authorUrban Müller2016-10-19 14:27:19 +0200
committerUrban Müller2016-10-19 14:27:19 +0200
commit7d9026fc969cc956f106403f611882d966e40f0d (patch)
treec847b8c28debd0b00e67c4e7b617a1cba5e6483b /it_pipe.class
parent2673b8592aca3f9144bd863c6981a5a3dd3e3628 (diff)
downloaditools-7d9026fc969cc956f106403f611882d966e40f0d.tar.gz
itools-7d9026fc969cc956f106403f611882d966e40f0d.tar.bz2
itools-7d9026fc969cc956f106403f611882d966e40f0d.zip
fix phan warnings
Diffstat (limited to 'it_pipe.class')
-rw-r--r--it_pipe.class12
1 files changed, 7 insertions, 5 deletions
diff --git a/it_pipe.class b/it_pipe.class
index 8b240ed..2ab931b 100644
--- a/it_pipe.class
+++ b/it_pipe.class
@@ -4,6 +4,9 @@ class it_pipe implements Iterator
{
static $lastargfunc = array('explode' => 1, 'preg_match' => 1, 'preg_split' => 1, 'it__match' => 1, 'it__replace' => 1);
+ var $lines; # all lines currently in pipe
+ var $_valid;
+
/**
* Creates a pipe object from input. Named arguments:
* $p['fn'] filename to read lines from
@@ -52,22 +55,22 @@ function rewind()
function next()
{
- $this->valid = each($this->lines);
+ $this->_valid = each($this->lines);
}
function valid()
{
- return $this->valid;
+ return $this->_valid;
}
function current()
{
- return $this->valid[1];
+ return $this->_valid[1];
}
function key()
{
- return $this->valid[0];
+ return $this->_valid[0];
}
@@ -199,7 +202,6 @@ function pipe($cmd)
fclose($pipes[0]);
$this->lines = explode("\n", rtrim(stream_get_contents($pipes[1])));
- $this->key = 0;
fclose($pipes[1]);
proc_close($process);