Skip to content

Commit 6c69ee5

Browse files
committed
Refactor executeCallback()
1 parent d478c2e commit 6c69ee5

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/React/Promise/Deferred.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,12 @@ public function resolver()
118118
protected function processQueue($queue, $value)
119119
{
120120
foreach ($queue as $handler) {
121-
$this->executeCallback($handler, $value);
121+
$this->executeCallback($handler, array($value));
122122
}
123123
}
124124

125-
protected function executeCallback($callback/*, $args ... */)
125+
protected function executeCallback($callback, array $args = array())
126126
{
127-
$args = func_get_args();
128-
array_shift($args);
129-
130127
call_user_func_array($callback, $args);
131128
}
132129
}

0 commit comments

Comments
 (0)