You are here

public function StringUtil::stringifyCalls in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php \Prophecy\Util\StringUtil::stringifyCalls()

Stringifies provided array of calls.

Parameters

Call[] $calls Array of Call instances:

Return value

string

File

vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php, line 77

Class

StringUtil
String utility.

Namespace

Prophecy\Util

Code

public function stringifyCalls(array $calls) {
  $self = $this;
  return implode(PHP_EOL, array_map(function (Call $call) use ($self) {
    return sprintf('  - %s(%s) @ %s', $call
      ->getMethodName(), implode(', ', array_map(array(
      $self,
      'stringify',
    ), $call
      ->getArguments())), str_replace(GETCWD() . DIRECTORY_SEPARATOR, '', $call
      ->getCallPlace()));
  }, $calls));
}