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

applySimpleTransformations() private method

Apply simple argument transformations in priority order.
private applySimpleTransformations ( array $transformations, Behat\Behat\Definition\Call\DefinitionCall $definitionCall, integer | string $index, mixed $value ) : mixed
$transformations array
$definitionCall Behat\Behat\Definition\Call\DefinitionCall
$index integer | string
$value mixed
return mixed
    private function applySimpleTransformations(array $transformations, DefinitionCall $definitionCall, $index, $value)
    {
        usort($transformations, function (SimpleArgumentTransformation $t1, SimpleArgumentTransformation $t2) {
            if ($t1->getPriority() == $t2->getPriority()) {
                return 0;
            }
            return $t1->getPriority() > $t2->getPriority() ? -1 : 1;
        });
        $newValue = $value;
        foreach ($transformations as $transformation) {
            $newValue = $this->transform($definitionCall, $transformation, $index, $newValue);
        }
        return $newValue;
    }