| @@ 64-78 (lines=15) @@ | ||
| 61 | ||
| 62 | $annotations = $this->reader->getMethodAnnotations($function); |
|
| 63 | ||
| 64 | foreach ($annotations as $annotation) { |
|
| 65 | if ($annotation instanceof StepInjectorArgument && |
|
| 66 | in_array($annotation->getArgument(), $paramsKeys) |
|
| 67 | ) { |
|
| 68 | /* @var StepInjectorArgument $annotation */ |
|
| 69 | foreach ($this->stepArgumentHolders as $hooker) { |
|
| 70 | if ($hooker->doesHandleStepArgument($annotation)) { |
|
| 71 | $match[$annotation->getArgument()] |
|
| 72 | = $match[strval(++$i)] |
|
| 73 | = $hooker->getStepArgumentValueFor($annotation) |
|
| 74 | ; |
|
| 75 | } |
|
| 76 | } |
|
| 77 | } |
|
| 78 | } |
|
| 79 | ||
| 80 | return $this->baseOrganiser->organiseArguments($function, $match); |
|
| 81 | } |
|
| @@ 63-74 (lines=12) @@ | ||
| 60 | ||
| 61 | // Prepare arguments from annotations |
|
| 62 | $annotations = $this->reader->getMethodAnnotations($function); |
|
| 63 | foreach ($annotations as $annotation) { |
|
| 64 | if ($annotation instanceof StepInjectorArgument && |
|
| 65 | in_array($annotation->getArgument(), $paramsKeys) |
|
| 66 | ) { |
|
| 67 | /* @var StepArgumentInjectorArgument $annotation */ |
|
| 68 | foreach ($this->stepArgumentHolders as $hooker) { |
|
| 69 | if ($hooker->doesHandleStepArgument($annotation)) { |
|
| 70 | $arguments[$annotation->getArgument()] = $hooker->getStepArgumentValueFor($annotation); |
|
| 71 | } |
|
| 72 | } |
|
| 73 | } |
|
| 74 | } |
|
| 75 | ||
| 76 | // Reorder arguments |
|
| 77 | $params = []; |
|