Behat\Behat\Context\Snippet\Generator\ContextSnippetGenerator::getMethodNumberFromTheMethodName PHP Method

getMethodNumberFromTheMethodName() private method

Tries to deduct method number from the provided method name.
private getMethodNumberFromTheMethodName ( string $methodName ) : integer
$methodName string
return integer
    private function getMethodNumberFromTheMethodName($methodName)
    {
        $methodNumber = 2;
        if (preg_match('/(\\d+)$/', $methodName, $matches)) {
            $methodNumber = intval($matches[1]);
        }
        return $methodNumber;
    }