Behat/Behat — pull request #596 by everzet (2014-07-16 22:47:57+00:00)
Title: Refactor argument resolver

There are couple of more complex cases for argument resolution that still did not work as expected.

## Ordered arguments

```php
/**
* @Given I can provide parameters :someParam and :someParam2
*/
public function definition($param1, $param2)
```

In this case, arguments should be matched in order of appearance.

## Ordered *and* named arguments together

```php
/**
* @Given I can provide parameters :someParam and :someParam2
*/
public function definition($param1, $someParam)
```

`:someParam` should be matched to `$someParam` by name and `:someParam2` should be matched to `$param1` because it is first non-matched argument.

## Complex case with both named and ordered arguments

```php
/**
* @Given I can provide :count parameters :firstParam and :otherParam with:
*/
public function definition($param1, $firstParam, $count, PyString $string)
```

`:count` should be matched by name to `$count`, `:firstParam` to `$firstParam`, `:otherParam` to `$param1` because there is no named match and multiline string to `$string`.

## PR

This PR makes all of these cases possible by introducing new `Testwork\Argument` package with multiple `ArgumentOrganiser`(s).