File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -60,10 +60,10 @@ public static function addImplementationToInterfaces(ObjectType $impl)
6060 */
6161 public static function loadImplementationToInterfaces ()
6262 {
63- foreach (self ::$ _lazyLoadImplementations as $ i => &$ lazyLoadImplementation ) {
64- call_user_func ($ lazyLoadImplementation );
65- unset(self ::$ _lazyLoadImplementations [$ i ]);
63+ foreach (self ::$ _lazyLoadImplementations as $ lazyLoadImplementation ) {
64+ $ lazyLoadImplementation ();
6665 }
66+ self ::$ _lazyLoadImplementations = [];
6767 }
6868
6969 /**
Original file line number Diff line number Diff line change @@ -232,22 +232,24 @@ public function testIncludesInterfaceSubtypesInTheTypeMap()
232232 public function testIncludesInterfacesThunkSubtypesInTheTypeMap ()
233233 {
234234 // includes interfaces' thunk subtypes in the type map
235- $ someInterface = new InterfaceType ([
236- 'name ' => 'SomeInterface ' ,
237- 'fields ' => [
238- 'f ' => ['type ' => Type::int ()]
239- ]
240- ]);
235+ $ someInterface = null ;
241236
242237 $ someSubtype = new ObjectType ([
243238 'name ' => 'SomeSubtype ' ,
244239 'fields ' => [
245240 'f ' => ['type ' => Type::int ()]
246241 ],
247- 'interfaces ' => function () use ($ someInterface ) { return [$ someInterface ]; },
242+ 'interfaces ' => function () use (& $ someInterface ) { return [$ someInterface ]; },
248243 'isTypeOf ' => function () {return true ;}
249244 ]);
250245
246+ $ someInterface = new InterfaceType ([
247+ 'name ' => 'SomeInterface ' ,
248+ 'fields ' => [
249+ 'f ' => ['type ' => Type::int ()]
250+ ]
251+ ]);
252+
251253 $ schema = new Schema (new ObjectType ([
252254 'name ' => 'Query ' ,
253255 'fields ' => [
You can’t perform that action at this time.
0 commit comments