Attributes: fix PHP 5.3 compatibilty issue

This commit is contained in:
Thomas Gelf 2016-11-28 17:01:01 +01:00
parent 1f5ad6fa12
commit c90b0f0eb1

View file

@ -153,12 +153,15 @@ class Attributes
/**
* Callback must return an instance of Attribute
*
* @param $name
* @param $callback
* @param string $name
* @param callable $callback
* @return $this
*/
public function registerCallbackFor($name, callable $callback)
public function registerCallbackFor($name, $callback)
{
if (! is_callable($callback)) {
throw new ProgrammingError('registerCallBack expects a callable callback');
}
$this->callbacks[$name] = $callback;
return $this;
}