You are here

public function CallCenter::findCalls in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php \Prophecy\Call\CallCenter::findCalls()

Searches for calls by method name & arguments wildcard.

Parameters

string $methodName:

ArgumentsWildcard $wildcard:

Return value

Call[]

File

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

Class

CallCenter
Calls receiver & manager.

Namespace

Prophecy\Call

Code

public function findCalls($methodName, ArgumentsWildcard $wildcard) {
  return array_values(array_filter($this->recordedCalls, function (Call $call) use ($methodName, $wildcard) {
    return $methodName === $call
      ->getMethodName() && 0 < $wildcard
      ->scoreArguments($call
      ->getArguments());
  }));
}