Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ThrowablePatch.php

function ThrowablePatch::setParentClassToException

1 call to ThrowablePatch::setParentClassToException()
ThrowablePatch::apply in vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php
Applies patch to the specific class node.

File

vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php, line 72

Class

ThrowablePatch

Namespace

Prophecy\Doubler\ClassPatch

Code

private function setParentClassToException(ClassNode $node) : void {
    $node->setParentClass('Exception');
    $node->removeMethod('getMessage');
    $node->removeMethod('getCode');
    $node->removeMethod('getFile');
    $node->removeMethod('getLine');
    $node->removeMethod('getTrace');
    $node->removeMethod('getPrevious');
    $node->removeMethod('getNext');
    $node->removeMethod('getTraceAsString');
}
RSS feed
Powered by Drupal