src/Behat/Behat/Context/Snippet/Generator/ContextSnippetGenerator.php
private function getMethodNumberFromTheMethodName($methodName)
    {
        $methodNumber = 2;
        if (preg_match('/(\d+)$/', $methodName, $matches)) {
            $methodNumber = intval($matches[1]);
        }

        return $methodNumber;
    }
private function getMethodNumberFromTheMethodName($methodName)
    {
        $methodNumber = 2;
        if (preg_match('/(\d+)$/', $methodName, $matches)) {
            $methodNumber = intval($matches[1]);
        }

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

@param string $methodName

@return integer
Tries to deduct method number from the provided method name .