You are here

public function HhvmExceptionPatch::apply in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/HhvmExceptionPatch.php \Prophecy\Doubler\ClassPatch\HhvmExceptionPatch::apply()

Removes special exception static methods from the doubled methods.

Parameters

ClassNode $node:

Return value

void

Overrides ClassPatchInterface::apply

File

vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/HhvmExceptionPatch.php, line 46

Class

HhvmExceptionPatch
Exception patch for HHVM to remove the stubs from special methods

Namespace

Prophecy\Doubler\ClassPatch

Code

public function apply(ClassNode $node) {
  if ($node
    ->hasMethod('setTraceOptions')) {
    $node
      ->getMethod('setTraceOptions')
      ->useParentCode();
  }
  if ($node
    ->hasMethod('getTraceOptions')) {
    $node
      ->getMethod('getTraceOptions')
      ->useParentCode();
  }
}