Behat\Behat\Transformation\Transformer\RepositoryArgumentTransformer::transform PHP Method

transform() private method

Transforms argument value using registered transformers.
private transform ( Behat\Behat\Definition\Call\DefinitionCall $definitionCall, Behat\Behat\Transformation\Transformation $transformation, integer | string $index, mixed $value ) : mixed
$definitionCall Behat\Behat\Definition\Call\DefinitionCall
$transformation Behat\Behat\Transformation\Transformation
$index integer | string
$value mixed
return mixed
    private function transform(DefinitionCall $definitionCall, Transformation $transformation, $index, $value)
    {
        if (is_object($value) && !$value instanceof ArgumentInterface) {
            return $value;
        }
        if ($transformation instanceof SimpleArgumentTransformation && $transformation->supportsDefinitionAndArgument($definitionCall, $index, $value)) {
            return $transformation->transformArgument($this->callCenter, $definitionCall, $index, $value);
        }
        if ($transformation instanceof PatternTransformation && $transformation->supportsDefinitionAndArgument($this, $definitionCall, $value)) {
            return $transformation->transformArgument($this, $this->callCenter, $definitionCall, $value);
        }
        return $value;
    }