/** * Construct a new static handle. * * @param ReflectionClass $class The class. * @param stdClass $state The state. * @param StubFactory $stubFactory The stub factory to use. * @param StubVerifierFactory $stubVerifierFactory The stub verifier factory to use. * @param AssertionRenderer $assertionRenderer The assertion renderer to use. * @param AssertionRecorder $assertionRecorder The assertion recorder to use. * @param Invoker $invoker The invoker to use. */ public function __construct(ReflectionClass $class, stdClass $state, StubFactory $stubFactory, StubVerifierFactory $stubVerifierFactory, AssertionRenderer $assertionRenderer, AssertionRecorder $assertionRecorder, Invoker $invoker) { if ($class->hasMethod('_callParentStatic')) { $callParentMethod = $class->getMethod('_callParentStatic'); $callParentMethod->setAccessible(true); } else { $callParentMethod = null; } if ($class->hasMethod('_callTraitStatic')) { $callTraitMethod = $class->getMethod('_callTraitStatic'); $callTraitMethod->setAccessible(true); } else { $callTraitMethod = null; } if ($class->hasMethod('_callMagicStatic')) { $callMagicMethod = $class->getMethod('_callMagicStatic'); $callMagicMethod->setAccessible(true); } else { $callMagicMethod = null; } parent::__construct($class, $state, $callParentMethod, $callTraitMethod, $callMagicMethod, null, $stubFactory, $stubVerifierFactory, $assertionRenderer, $assertionRecorder, $invoker); }