Skip to content

Commit

Permalink
[DI] Add support for immutable setters in CallTrait
Browse files Browse the repository at this point in the history
  • Loading branch information
Lctrs committed Dec 11, 2019
1 parent 3df1d1e commit 90ace51
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -18,16 +18,17 @@ trait CallTrait
/**
* Adds a method to call after service initialization.
*
* @param string $method The method name to call
* @param array $arguments An array of arguments to pass to the method call
* @param string $method The method name to call
* @param array $arguments An array of arguments to pass to the method call
* @param bool $returnsClone Whether the call returns the service instance or not
*
* @return $this
*
* @throws InvalidArgumentException on empty $method param
*/
final public function call($method, array $arguments = [])
final public function call($method, array $arguments = [], $returnsClone = false)
{
$this->definition->addMethodCall($method, static::processValue($arguments, true));
$this->definition->addMethodCall($method, static::processValue($arguments, true), $returnsClone);

return $this;
}
Expand Down

0 comments on commit 90ace51

Please sign in to comment.