Skip to content

Commit

Permalink
fixing more ...
Browse files Browse the repository at this point in the history
  • Loading branch information
chemisus committed Feb 29, 2016
1 parent dd7ff0f commit b130cee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/Callbacks/Diff.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class Diff extends Method
{
public function __invoke(... $params)
public function __invoke()
{
return call_user_func_array('array_diff', array_reverse(func_get_args()));
}
Expand Down
25 changes: 6 additions & 19 deletions src/StreamNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ function __call($key, $arguments)
/**
* @inheritDoc
*/
public function then(callable $callback, ... $params)
public function then(callable $callback)
{
return $this->thenp($callback, $params);
return $this->thenp($callback, array_slice(func_get_args(), 1));
}

/**
Expand All @@ -129,17 +129,17 @@ public function thenp(callable $callback, array $params = [])
/**
* @inheritDoc
*/
public function __invoke(... $params)
public function __invoke()
{
return $this->apply($params);
return $this->apply(func_get_args());
}

/**
* @inheritDoc
*/
public function call(... $params)
public function call()
{
return $this->apply($params);
return $this->apply(func_get_args());
}

/**
Expand Down Expand Up @@ -188,18 +188,6 @@ public function callbacks()

/**
* @param mixed $field
* @param array ...$params
* @return Stream
*/
public function set(&$field, ... $params)
{
$args = array_merge([&$field], $params);
return $this->callbackService->next($this, __FUNCTION__, $args);
}

/**
* @param mixed $field
* @param array ...$params
* @return Stream
*/
public function increment(&$field)
Expand All @@ -210,7 +198,6 @@ public function increment(&$field)

/**
* @param mixed $field
* @param array ...$params
* @return Stream
*/
public function decrement(&$field)
Expand Down

0 comments on commit b130cee

Please sign in to comment.