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

Breadcrumb

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

function ThrowablePatch::implementsAThrowableInterface

Parameters

ClassNode $node:

Return value

bool

1 call to ThrowablePatch::implementsAThrowableInterface()
ThrowablePatch::supports in vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php
Checks if patch supports specific class node.

File

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

Class

ThrowablePatch

Namespace

Prophecy\Doubler\ClassPatch

Code

private function implementsAThrowableInterface(ClassNode $node) {
    foreach ($node->getInterfaces() as $type) {
        if (is_a($type, 'Throwable', true)) {
            return true;
        }
    }
    return false;
}
RSS feed
Powered by Drupal