<?php method_exists(object|string $object_or_class, string $method): bool
<?php return $promiseOrValue; } if (\is_object($promiseOrValue) && \method_exists($promiseOrValue, 'then')) { $canceller = null; if (\method_exists($promiseOrValue, 'cancel')) {
<?php if (\is_object($promiseOrValue) && \method_exists($promiseOrValue, 'then')) { $canceller = null; if (\method_exists($promiseOrValue, 'cancel')) { $canceller = [$promiseOrValue, 'cancel']; }
<?php public function enqueue($cancellable): void { if (!\is_object($cancellable) || !\method_exists($cancellable, 'then') || !\method_exists($cancellable, 'cancel')) { return; }
<?php protected function createCallableMock() { if (method_exists('PHPUnit\Framework\MockObject\MockBuilder', 'addMethods')) { return $this->getMockBuilder('stdClass')->addMethods(array('__invoke'))->getMock(); } else {