Skip to content

Commit f3d1ddc

Browse files
committed
Rename callback variable to convey purpose
1 parent 56a33c1 commit f3d1ddc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Model/CallbackIterator.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@
3737
class CallbackIterator implements Iterator
3838
{
3939
/** @var callable(TValue, TKey): TCallbackValue */
40-
private $callable;
40+
private $callback;
4141

4242
/** @var Iterator<TKey, TValue> */
4343
private $iterator;
4444

4545
/**
4646
* @param Traversable<TKey, TValue> $traversable
47-
* @param callable(TValue, TKey): TCallbackValue $callable
47+
* @param callable(TValue, TKey): TCallbackValue $callback
4848
*/
49-
public function __construct(Traversable $traversable, callable $callable)
49+
public function __construct(Traversable $traversable, callable $callback)
5050
{
5151
$this->iterator = $traversable instanceof Iterator ? $traversable : new IteratorIterator($traversable);
52-
$this->callable = $callable;
52+
$this->callback = $callback;
5353
}
5454

5555
/**
@@ -59,7 +59,7 @@ public function __construct(Traversable $traversable, callable $callable)
5959
#[ReturnTypeWillChange]
6060
public function current()
6161
{
62-
return call_user_func($this->callable, $this->iterator->current(), $this->iterator->key());
62+
return call_user_func($this->callback, $this->iterator->current(), $this->iterator->key());
6363
}
6464

6565
/**

0 commit comments

Comments
 (0)