@@ -21,7 +21,7 @@ |
||
| 21 | 21 | $this->direction = $direction; |
| 22 | 22 | $this->flags = $flags; |
| 23 | 23 | $this->callback = \Closure::fromCallable($callback); |
| 24 | - $this->realCallback = $direction == self::SORT_ASC ? $this->callback : function ($cmpA, $cmpB) { |
|
| 24 | + $this->realCallback = $direction == self::SORT_ASC ? $this->callback : function($cmpA, $cmpB) { |
|
| 25 | 25 | return ($this->callback)($cmpB, $cmpA); |
| 26 | 26 | }; |
| 27 | 27 | parent::__construct($this->getSortedIterator($iterator)); |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $callback = \Closure::fromCallable($callback); |
| 107 | 107 | $this->process( |
| 108 | 108 | $input, |
| 109 | - function ($row, $rowNum, $input, $output) use ($callback) { |
|
| 109 | + function($row, $rowNum, $input, $output) use ($callback) { |
|
| 110 | 110 | if ($fileName = $callback($row)) { |
| 111 | 111 | if (!$output->isFileOpen($fileName)) { |
| 112 | 112 | $output->openFile($fileName)->fputcsv(array_keys($row)); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $input->rewind(); |
| 133 | 133 | iterator_apply( |
| 134 | 134 | $input, |
| 135 | - function (\Iterator $iterator) use ($callback) { |
|
| 135 | + function(\Iterator $iterator) use ($callback) { |
|
| 136 | 136 | $callback($iterator->current(), $iterator->key(), $iterator, $this); |
| 137 | 137 | return true; |
| 138 | 138 | }, |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $callback = \Closure::fromCallable($callback); |
| 49 | 49 | iterator_apply( |
| 50 | 50 | $iterator, |
| 51 | - function ($iterator) use (&$initial, $callback) { |
|
| 51 | + function($iterator) use (&$initial, $callback) { |
|
| 52 | 52 | $initial = $callback($initial, $iterator->current(), $iterator->key()); |
| 53 | 53 | return true; |
| 54 | 54 | }, |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | { |
| 62 | 62 | return self::reduce( |
| 63 | 63 | $iterator, |
| 64 | - function ($carry, $value, $key) { |
|
| 64 | + function($carry, $value, $key) { |
|
| 65 | 65 | return $carry + $value; |
| 66 | 66 | }, |
| 67 | 67 | 0 |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | { |
| 73 | 73 | return self::reduce( |
| 74 | 74 | $iterator, |
| 75 | - function ($carry, $value) { |
|
| 75 | + function($carry, $value) { |
|
| 76 | 76 | return $carry * $value; |
| 77 | 77 | }, |
| 78 | 78 | 1 |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | { |
| 89 | 89 | return self::reduce( |
| 90 | 90 | $iterator, |
| 91 | - function ($carry, $value) { |
|
| 91 | + function($carry, $value) { |
|
| 92 | 92 | return $carry < $value ? $carry : $value; |
| 93 | 93 | }, |
| 94 | 94 | INF |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | { |
| 100 | 100 | return self::reduce( |
| 101 | 101 | $iterator, |
| 102 | - function ($carry, $value) { |
|
| 102 | + function($carry, $value) { |
|
| 103 | 103 | return $carry > $value ? $carry : $value; |
| 104 | 104 | }, |
| 105 | 105 | -INF |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | { |
| 111 | 111 | return self::reduce( |
| 112 | 112 | $iterator, |
| 113 | - function ($carry, $value) { |
|
| 113 | + function($carry, $value) { |
|
| 114 | 114 | return $carry . $value; |
| 115 | 115 | }, |
| 116 | 116 | '' |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | { |
| 122 | 122 | $result = self::reduce( |
| 123 | 123 | $iterator, |
| 124 | - function ($carry, $value) use ($separator) { |
|
| 124 | + function($carry, $value) use ($separator) { |
|
| 125 | 125 | return $carry . $value . $separator; |
| 126 | 126 | }, |
| 127 | 127 | '' |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | parent::__construct( |
| 48 | 48 | new InfiniteIterator( |
| 49 | 49 | new ReplaceableIterator(), |
| 50 | - function ($iterator) { |
|
| 50 | + function($iterator) { |
|
| 51 | 51 | return !$iterator->current()->valid(); |
| 52 | 52 | } |
| 53 | 53 | ) |
@@ -152,7 +152,7 @@ |
||
| 152 | 152 | $input->rewind(); |
| 153 | 153 | iterator_apply( |
| 154 | 154 | $input, |
| 155 | - function (\Iterator $iterator) use ($callback) { |
|
| 155 | + function(\Iterator $iterator) use ($callback) { |
|
| 156 | 156 | $callback($iterator->current(), $iterator->key(), $iterator, $this); |
| 157 | 157 | return true; |
| 158 | 158 | }, |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | // Actual glob filtering. |
| 60 | 60 | $fIterator = new \CallbackFilterIterator( |
| 61 | 61 | $rIterator, |
| 62 | - function (&$current, &$key) use ($iteratorId, $regexPattern) { |
|
| 62 | + function(&$current, &$key) use ($iteratorId, $regexPattern) { |
|
| 63 | 63 | GlobIteratorFileInfo::setIteratorId($iteratorId); |
| 64 | 64 | $fileInfo = $current->getFileInfo(GlobIteratorFileInfo::class); |
| 65 | 65 | if ($this->flags & \FilesystemIterator::CURRENT_AS_PATHNAME) { |