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

Breadcrumb

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

function CallCenter::findMethodProphecies

@phpstan-return list<array{int, MethodProphecy}>

Parameters

ObjectProphecy<object> $prophecy:

string $methodName:

array<mixed> $arguments:

Return value

array

2 calls to CallCenter::findMethodProphecies()
CallCenter::checkUnexpectedCalls in vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php
CallCenter::makeCall in vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php
Makes and records specific method call for object prophecy.

File

vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php, line 245

Class

CallCenter
Calls receiver & manager.

Namespace

Prophecy\Call

Code

private function findMethodProphecies(ObjectProphecy $prophecy, $methodName, array $arguments) {
    $matches = array();
    foreach ($prophecy->getMethodProphecies($methodName) as $methodProphecy) {
        if (0 < ($score = $methodProphecy->getArgumentsWildcard()
            ->scoreArguments($arguments))) {
            $matches[] = array(
                $score,
                $methodProphecy,
            );
        }
    }
    return $matches;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal