src/Behat/Behat/Context/Snippet/Generator/ContextSnippetGenerator.php
private function getMethodNameNotExistentInContext(ReflectionClass $reflection, $methodName, $methodNumber)
    {
        while ($reflection->hasMethod($methodName)) {
            $methodName = preg_replace('/\d+$/', '', $methodName);
            $methodName .= $methodNumber++;
        }

        return array($methodName, $methodNumber);
    }
private function getMethodNameNotExistentInContext(ReflectionClass $reflection, $methodName, $methodNumber)
    {
        while ($reflection->hasMethod($methodName)) {
            $methodName = preg_replace('/\d+$/', '', $methodName);
            $methodName .= $methodNumber++;
        }

        return array($methodName, $methodNumber);
    }
private function getMethodNameNotExistentInContext ( ReflectionClass $ reflection , $ methodName , $ methodNumber ) { while ( $ reflection -> hasMethod ( $ methodName ) ) { $ methodName = preg_replace ( '/\d+$/' , '' , $ methodName ) ; $ methodName .= $ methodNumber ++ ; } return array ( $ methodName , $ methodNumber ) ; }
Tries to guess method name that is not yet defined in the context class.

@param ReflectionClass $reflection
@param string          $methodName
@param integer         $methodNumber

@return array
Tries to guess method name that is not yet defined in the context class .