setDefaultResolveFn should be static

To ease override of $defaultResolveFn the setter should be `static`
This commit is contained in:
Jérémiah VALERIE 2016-03-12 00:30:46 +01:00
parent dba93ab233
commit 8763c94ea3

View File

@ -55,7 +55,7 @@ class Executor
* @param $fn * @param $fn
* @throws \Exception * @throws \Exception
*/ */
public function setDefaultResolveFn($fn) public static function setDefaultResolveFn($fn)
{ {
Utils::invariant(is_callable($fn), 'Expecting callable, but got ' . Utils::getVariableType($fn)); Utils::invariant(is_callable($fn), 'Expecting callable, but got ' . Utils::getVariableType($fn));
self::$defaultResolveFn = $fn; self::$defaultResolveFn = $fn;