diff options
author | ignace nyamagana butera <nyamsprod@gmail.com> | 2015-10-21 13:29:43 +0200 |
---|---|---|
committer | ignace nyamagana butera <nyamsprod@gmail.com> | 2015-10-21 13:29:43 +0200 |
commit | cbfc72a07f8c20843153efce08cb955945f3c023 (patch) | |
tree | a5e8afb978495710d45a171b3173bac658cc9f5d /src/Modifier/MapIterator.php | |
parent | b8e0853c2e021f47a08bb38060e8e93a27cce3ba (diff) | |
download | csv-cbfc72a07f8c20843153efce08cb955945f3c023.zip csv-cbfc72a07f8c20843153efce08cb955945f3c023.tar.gz csv-cbfc72a07f8c20843153efce08cb955945f3c023.tar.bz2 |
Improve code
- using call_user_func to avoid PHP bug https://bugs.php.net/bug.php?id=68475
- improve regexp documentation
- add more excluded files to gitattributes
Diffstat (limited to 'src/Modifier/MapIterator.php')
-rw-r--r-- | src/Modifier/MapIterator.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Modifier/MapIterator.php b/src/Modifier/MapIterator.php index 436cb99..cedc95b 100644 --- a/src/Modifier/MapIterator.php +++ b/src/Modifier/MapIterator.php @@ -50,8 +50,7 @@ class MapIterator extends IteratorIterator public function current() { $iterator = $this->getInnerIterator(); - $callable = $this->callable; - return $callable($iterator->current(), $iterator->key(), $iterator); + return call_user_func($this->callable, $iterator->current(), $iterator->key(), $iterator); } } |