Since $factory is declared private, accessing it with static will lead to errors in possible sub-classes; you can either use self, or increase the visibility of $factory to at least protected.
Loading history...
35
throw new \RuntimeException('Widget factory should be initialized with WidgetFactory::initialize() call.');